1
linux/kernel/sched
Tetsuo Handa b88f55389a profiling: remove profile=sleep support
The kernel sleep profile is no longer working due to a recursive locking
bug introduced by commit 42a20f86dc ("sched: Add wrapper for get_wchan()
to keep task blocked")

Booting with the 'profile=sleep' kernel command line option added or
executing

  # echo -n sleep > /sys/kernel/profiling

after boot causes the system to lock up.

Lockdep reports

  kthreadd/3 is trying to acquire lock:
  ffff93ac82e08d58 (&p->pi_lock){....}-{2:2}, at: get_wchan+0x32/0x70

  but task is already holding lock:
  ffff93ac82e08d58 (&p->pi_lock){....}-{2:2}, at: try_to_wake_up+0x53/0x370

with the call trace being

   lock_acquire+0xc8/0x2f0
   get_wchan+0x32/0x70
   __update_stats_enqueue_sleeper+0x151/0x430
   enqueue_entity+0x4b0/0x520
   enqueue_task_fair+0x92/0x6b0
   ttwu_do_activate+0x73/0x140
   try_to_wake_up+0x213/0x370
   swake_up_locked+0x20/0x50
   complete+0x2f/0x40
   kthread+0xfb/0x180

However, since nobody noticed this regression for more than two years,
let's remove 'profile=sleep' support based on the assumption that nobody
needs this functionality.

Fixes: 42a20f86dc ("sched: Add wrapper for get_wchan() to keep task blocked")
Cc: stable@vger.kernel.org # v5.16+
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-08-04 13:36:28 -07:00
..
autogroup.c scheduler: Remove the now superfluous sentinel elements from ctl_table array 2024-04-24 09:43:54 +02:00
autogroup.h
build_policy.c sched/syscalls: Split out kernel/sched/syscalls.c from kernel/sched/core.c 2024-05-27 13:56:10 +02:00
build_utility.c
clock.c sched: Fix spelling in comments 2024-05-27 17:00:21 +02:00
completion.c
core_sched.c sched: Fix spelling in comments 2024-05-27 17:00:21 +02:00
core.c sched/core: Fix unbalance set_rq_online/offline() in sched_cpu_deactivate() 2024-07-29 12:22:33 +02:00
cpuacct.c
cpudeadline.c
cpudeadline.h
cpufreq_schedutil.c
cpufreq.c
cpupri.c
cpupri.h
cputime.c sched/cputime: Fix mul_u64_u64_div_u64() precision for cputime 2024-07-29 12:22:32 +02:00
deadline.c Merge branch 'sched/urgent' into sched/core, to pick up fixes and refresh the branch 2024-07-11 10:42:33 +02:00
debug.c sched/debug: Dump domains' level 2024-05-17 09:48:25 +02:00
fair.c Merge branch 'sched/urgent' into sched/core, to pick up fixes and refresh the branch 2024-07-11 10:42:33 +02:00
features.h
idle.c idle: Remove stale RCU comment 2024-06-05 15:52:35 +02:00
isolation.c sched/isolation: Fix boot crash when maxcpus < first housekeeping CPU 2024-04-28 10:08:21 +02:00
loadavg.c sched: Fix spelling in comments 2024-05-27 17:00:21 +02:00
Makefile
membarrier.c RISC-V Patches for the 6.9 Merge Window 2024-03-22 10:41:13 -07:00
pelt.c sched: Fix spelling in comments 2024-05-27 17:00:21 +02:00
pelt.h sched/cpufreq: Rename arch_update_thermal_pressure() => arch_update_hw_pressure() 2024-04-24 12:08:01 +02:00
psi.c Merge branch 'sched/urgent' into sched/core, to pick up fixes and refresh the branch 2024-07-11 10:42:33 +02:00
rt.c sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
sched-pelt.h
sched.h Merge branch 'sched/urgent' into sched/core, to pick up fixes and refresh the branch 2024-07-11 10:42:33 +02:00
smp.h
stats.c profiling: remove profile=sleep support 2024-08-04 13:36:28 -07:00
stats.h Merge branch 'sched/urgent' into sched/core, to pick up fixes and refresh the branch 2024-07-11 10:42:33 +02:00
stop_task.c
swait.c
syscalls.c sched: Fix spelling in comments 2024-05-27 17:00:21 +02:00
topology.c sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
wait_bit.c sched: Fix spelling in comments 2024-05-27 17:00:21 +02:00
wait.c