next/master bisection: baseline.login on qemu_i386
On Wed, Mar 09, 2022 at 05:12:07AM -0800, KernelCI bot wrote:
The KernelCI bisection bot found that commit dc6e0818bc9a0336d9a ("sched/cpuacct: Optimize away RCU read lock") has been causing boot failures for i386 qemu systems running a defconfig with debug options added in -next. The system comes up to userspace but the shell is unresponsive, most other architectures and configs (including i386 without debug options) seem fine.
I've left the full bisection report including links to logs below, you can also see a full overview of the baseline tests for -next today at:
https://linux.kernelci.org/test/job/next/branch/master/kernel/next-20220309/plan/baseline/
Quoted 132 lines
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This automated bisection report was sent to you on the basis * * that you may be involved with the breaking commit it has * * found. No manual investigation has been done to verify it, * * and the root cause of the problem may be somewhere else. * * * * If you do send a fix, please include this trailer: * * Reported-by: "kernelci.org bot" <[email protected]> * * * * Hope this helps! ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
next/master bisection: baseline.login on
qemu_i386Summary:
Start: cb153b68ff91 Add linux-next specific files for 20220308 Plain log: https://storage.kernelci.org/next/master/next-20220308/i386/i386_defconfig+debug/gcc-10/lab-baylibre/baseline-qemu_i386.txt HTML log: https://storage.kernelci.org/next/master/next-20220308/i386/i386_defconfig+debug/gcc-10/lab-baylibre/baseline-qemu_i386.html Result: dc6e0818bc9a sched/cpuacct: Optimize away RCU read lockChecks:
revert: PASS
verify: PASSParameters:
Tree: next URL: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git Branch: master Target: qemu_i386 CPU arch: i386 Lab: lab-baylibre Compiler: gcc-10 Config: i386_defconfig+debug Test case: baseline.loginBreaking commit found:
-------------------------------------------------------------------------------
commitdc6e0818bc9a0336d9accf3ea35d146d72aa7a18Author: Chengming Zhou <[email protected]> Date: Sun Feb 20 13:14:25 2022 +0800sched/cpuacct: Optimize away RCU read lock
Since
cpuacct_charge()is called from the schedulerupdate_curr(), we must already have rq lock held, then the RCU read lock can be optimized away.And do the same thing in it's wrapper
cgroup_account_cputime(), but we can't uselockdep_assert_rq_held()there, which defined inkernel/sched/sched.h.Suggested-by Peter Zijlstra (Intel) <[email protected]>Signed-off-by Chengming Zhou <[email protected]>Signed-off-by Peter Zijlstra (Intel) <[email protected]>include/linux/cgroup.h +0
-2@@ -791,11 +791,9 @@ static inline void cgroup_account_cputime(struct task_struct *task,cpuacct_charge (task, delta_exec); -rcu_read_lock (); cgrp =task_dfl_cgroup (task);if (cgroup_parent (cgrp))__cgroup_account_cputime (cgrp, delta_exec); -rcu_read_unlock (); } static inline void cgroup_account_cputime_field(struct task_struct *task,kernel/sched/cpuacct.c +1
-4@@ -337,12 +337,10 @@ void cpuacct_charge(struct task_struct *tsk, u64 cputime)unsigned int cpu =task_cpu (tsk);struct cpuacct *ca; -rcu_read_lock (); +lockdep_assert_rq_held (cpu_rq (cpu));for (ca =task_ca (tsk); ca; ca =parent_ca (ca)) *per_cpu_ptr (ca->cpuusage, cpu) += cputime; - -rcu_read_unlock (); }/* ------------------------------------------------------------------------------- Git bisection log:
-------------------------------------------------------------------------------
git bisect start
# good: [ea4424be16887a37735d6550cfd0611528dbe5d9] Merge tag 'mtd/fixes-for-5.17-rc8' ofgit://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
git bisect goodea4424be16887a37735d6550cfd0611528dbe5d9
# bad: [cb153b68ff91cbc434f3de70ac549e110543e1bb] Add linux-next specific files for 20220308
git bisect badcb153b68ff91cbc434f3de70ac549e110543e1bb
# good: [1ce7aac49a7b73abbd691c6e6a1577a449d90bad] Merge branch 'master' ofgit://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
git bisect good1ce7aac49a7b73abbd691c6e6a1577a449d90bad
# bad: [08688e100b1b07ce178c1d3c6b9983e00cd85413] Merge branch 'for-next' ofgit://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
git bisect bad08688e100b1b07ce178c1d3c6b9983e00cd85413
# good: [3255b3a262be263864fcc5d5a239aebd1d0b2bb4] Merge branch 'drm-next' of https://gitlab.freedesktop.org/agd5f/linux
git bisect good3255b3a262be263864fcc5d5a239aebd1d0b2bb4
# good: [983377cbb2ba7038a34b68f43788e78b34cb01d6] Merge branch 'pcmcia-next' ofgit://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git
git bisect good983377cbb2ba7038a34b68f43788e78b34cb01d6
# good: [71e306ad46cd73f05b9ba151161b4a3c1bd25e5d] Merge branch 'for-next' ofgit://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
git bisect good71e306ad46cd73f05b9ba151161b4a3c1bd25e5d
# bad: [a66320f041601309f1885bcb52e27e0c2f72079b] Merge branch into tip/master: 'core/core'
git bisect bada66320f041601309f1885bcb52e27e0c2f72079b
# good: [9eb0c9821cf7efd5d18e2707caa01691c6d4fbf6] Merge branch into tip/master: 'x86/build'
git bisect good9eb0c9821cf7efd5d18e2707caa01691c6d4fbf6
# bad: [49bef33e4b87b743495627a529029156c6e09530] sched/rt: Plugrt_mutex_setprio()vspush_rt_task()race
git bisect bad49bef33e4b87b743495627a529029156c6e09530
# good: [2cfb7a1b031b0e816af7a6ee0c6ab83b0acdf05a] sched/fair: Improve consistency of allowed NUMA balance calculations
git bisect good2cfb7a1b031b0e816af7a6ee0c6ab83b0acdf05a
# good: [65e53f869e9f92a23593c66214b88e54fb190a13] sched/isolation: Fixhousekeeping_maskmemory leak
git bisect good65e53f869e9f92a23593c66214b88e54fb190a13
# good: [99cf983cc8bca4adb461b519664c939a565cfd4d] sched/preempt: AddPREEMPT_DYNAMICusing static keys
git bisect good99cf983cc8bca4adb461b519664c939a565cfd4d
# good: [6255b48aebfd4dff375e97fc8b075a235848db0b] Merge tag 'v5.17-rc5' into sched/core, to resolve conflicts
git bisect good6255b48aebfd4dff375e97fc8b075a235848db0b
# bad: [dc6e0818bc9a0336d9accf3ea35d146d72aa7a18] sched/cpuacct: Optimize away RCU read lock
git bisect baddc6e0818bc9a0336d9accf3ea35d146d72aa7a18
# good: [248cc9993d1cc12b8e9ed716cc3fc09f6c3517dd] sched/cpuacct: Fix charge percpu cpuusage
git bisect good248cc9993d1cc12b8e9ed716cc3fc09f6c3517dd# first bad commit: [dc6e0818bc9a0336d9accf3ea35d146d72aa7a18] sched/cpuacct: Optimize away RCU read lock -------------------------------------------------------------------------------
Quoted 9 lines · Mark Brown
On Wed, Mar 09, 2022 at 05:12:07AM -0800, KernelCI bot wrote:
The KernelCI bisection bot found that commit
dc6e0818bc9a0336d9a("sched/cpuacct: Optimize away RCU read lock") has been causing boot failures for i386 qemu systems running a defconfig with debug options added in -next. The system comes up to userspace but the shell is unresponsive, most other architectures and configs (including i386 without debug options) seem fine.
Quoted 4 lines
I've left the full bisection report including links to logs below, you can also see a full overview of the baseline tests for -next today at:
https://linux.kernelci.org/test/job/next/branch/master/kernel/next-20220309/plan/baseline/
Hi Mark, thanks for the bisection report. I've send a fix patch[1] for review.
[1] https://lore.kernel.org/lkml/[email protected]/
Quoted 133 lines
Quoted 133 lines
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This automated bisection report was sent to you on the basis * * that you may be involved with the breaking commit it has * * found. No manual investigation has been done to verify it, * * and the root cause of the problem may be somewhere else. * * * * If you do send a fix, please include this trailer: * * Reported-by: "kernelci.org bot" <[email protected]> * * * * Hope this helps! ** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
next/master bisection: baseline.login on
qemu_i386Summary:
Start: cb153b68ff91 Add linux-next specific files for 20220308 Plain log: https://storage.kernelci.org/next/master/next-20220308/i386/i386_defconfig+debug/gcc-10/lab-baylibre/baseline-qemu_i386.txt HTML log: https://storage.kernelci.org/next/master/next-20220308/i386/i386_defconfig+debug/gcc-10/lab-baylibre/baseline-qemu_i386.html Result: dc6e0818bc9a sched/cpuacct: Optimize away RCU read lockChecks:
revert: PASS
verify: PASSParameters:
Tree: next URL: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git Branch: master Target: qemu_i386 CPU arch: i386 Lab: lab-baylibre Compiler: gcc-10 Config: i386_defconfig+debug Test case: baseline.loginBreaking commit found:
-------------------------------------------------------------------------------
commitdc6e0818bc9a0336d9accf3ea35d146d72aa7a18Author: Chengming Zhou <[email protected]> Date: Sun Feb 20 13:14:25 2022 +0800sched/cpuacct: Optimize away RCU read lock
Since
cpuacct_charge()is called from the schedulerupdate_curr(), we must already have rq lock held, then the RCU read lock can be optimized away.And do the same thing in it's wrapper
cgroup_account_cputime(), but we can't uselockdep_assert_rq_held()there, which defined inkernel/sched/sched.h.Suggested-by Peter Zijlstra (Intel) <[email protected]>Signed-off-by Chengming Zhou <[email protected]>Signed-off-by Peter Zijlstra (Intel) <[email protected]>include/linux/cgroup.h +0
-2@@ -791,11 +791,9 @@ static inline void cgroup_account_cputime(struct task_struct *task,cpuacct_charge (task, delta_exec); -rcu_read_lock (); cgrp =task_dfl_cgroup (task);if (cgroup_parent (cgrp))__cgroup_account_cputime (cgrp, delta_exec); -rcu_read_unlock (); } static inline void cgroup_account_cputime_field(struct task_struct *task,kernel/sched/cpuacct.c +1
-4@@ -337,12 +337,10 @@ void cpuacct_charge(struct task_struct *tsk, u64 cputime)unsigned int cpu =task_cpu (tsk);struct cpuacct *ca; -rcu_read_lock (); +lockdep_assert_rq_held (cpu_rq (cpu));for (ca =task_ca (tsk); ca; ca =parent_ca (ca)) *per_cpu_ptr (ca->cpuusage, cpu) += cputime; - -rcu_read_unlock (); }/* ------------------------------------------------------------------------------- Git bisection log:
-------------------------------------------------------------------------------
git bisect start
# good: [ea4424be16887a37735d6550cfd0611528dbe5d9] Merge tag 'mtd/fixes-for-5.17-rc8' ofgit://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
git bisect goodea4424be16887a37735d6550cfd0611528dbe5d9
# bad: [cb153b68ff91cbc434f3de70ac549e110543e1bb] Add linux-next specific files for 20220308
git bisect badcb153b68ff91cbc434f3de70ac549e110543e1bb
# good: [1ce7aac49a7b73abbd691c6e6a1577a449d90bad] Merge branch 'master' ofgit://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
git bisect good1ce7aac49a7b73abbd691c6e6a1577a449d90bad
# bad: [08688e100b1b07ce178c1d3c6b9983e00cd85413] Merge branch 'for-next' ofgit://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
git bisect bad08688e100b1b07ce178c1d3c6b9983e00cd85413
# good: [3255b3a262be263864fcc5d5a239aebd1d0b2bb4] Merge branch 'drm-next' of https://gitlab.freedesktop.org/agd5f/linux
git bisect good3255b3a262be263864fcc5d5a239aebd1d0b2bb4
# good: [983377cbb2ba7038a34b68f43788e78b34cb01d6] Merge branch 'pcmcia-next' ofgit://git.kernel.org/pub/scm/linux/kernel/git/brodo/linux.git
git bisect good983377cbb2ba7038a34b68f43788e78b34cb01d6
# good: [71e306ad46cd73f05b9ba151161b4a3c1bd25e5d] Merge branch 'for-next' ofgit://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
git bisect good71e306ad46cd73f05b9ba151161b4a3c1bd25e5d
# bad: [a66320f041601309f1885bcb52e27e0c2f72079b] Merge branch into tip/master: 'core/core'
git bisect bada66320f041601309f1885bcb52e27e0c2f72079b
# good: [9eb0c9821cf7efd5d18e2707caa01691c6d4fbf6] Merge branch into tip/master: 'x86/build'
git bisect good9eb0c9821cf7efd5d18e2707caa01691c6d4fbf6
# bad: [49bef33e4b87b743495627a529029156c6e09530] sched/rt: Plugrt_mutex_setprio()vspush_rt_task()race
git bisect bad49bef33e4b87b743495627a529029156c6e09530
# good: [2cfb7a1b031b0e816af7a6ee0c6ab83b0acdf05a] sched/fair: Improve consistency of allowed NUMA balance calculations
git bisect good2cfb7a1b031b0e816af7a6ee0c6ab83b0acdf05a
# good: [65e53f869e9f92a23593c66214b88e54fb190a13] sched/isolation: Fixhousekeeping_maskmemory leak
git bisect good65e53f869e9f92a23593c66214b88e54fb190a13
# good: [99cf983cc8bca4adb461b519664c939a565cfd4d] sched/preempt: AddPREEMPT_DYNAMICusing static keys
git bisect good99cf983cc8bca4adb461b519664c939a565cfd4d
# good: [6255b48aebfd4dff375e97fc8b075a235848db0b] Merge tag 'v5.17-rc5' into sched/core, to resolve conflicts
git bisect good6255b48aebfd4dff375e97fc8b075a235848db0b
# bad: [dc6e0818bc9a0336d9accf3ea35d146d72aa7a18] sched/cpuacct: Optimize away RCU read lock
git bisect baddc6e0818bc9a0336d9accf3ea35d146d72aa7a18
# good: [248cc9993d1cc12b8e9ed716cc3fc09f6c3517dd] sched/cpuacct: Fix charge percpu cpuusage
git bisect good248cc9993d1cc12b8e9ed716cc3fc09f6c3517dd# first bad commit: [dc6e0818bc9a0336d9accf3ea35d146d72aa7a18] sched/cpuacct: Optimize away RCU read lock -------------------------------------------------------------------------------