path: root/kernel
diff options
authorAndrey Ryabinin <>2016-06-09 15:20:05 +0300
committerIngo Molnar <>2016-06-14 12:48:38 +0200
commit57675cb976eff977aefb428e68e4e0236d48a9ff (patch)
tree3c61c93aabc2b6597a249492454db2ebf14d347f /kernel
parenteda8dca519269c92a0771668b3d5678792de7b78 (diff)
kernel/sysrq, watchdog, sched/core: Reset watchdog on all CPUs while processing sysrq-w
Lengthy output of sysrq-w may take a lot of time on slow serial console. Currently we reset NMI-watchdog on the current CPU to avoid spurious lockup messages. Sometimes this doesn't work since softlockup watchdog might trigger on another CPU which is waiting for an IPI to proceed. We reset softlockup watchdogs on all CPUs, but we do this only after listing all tasks, and this may be too late on a busy system. So, reset watchdogs CPUs earlier, in for_each_process_thread() loop. Signed-off-by: Andrey Ryabinin <> Cc: Linus Torvalds <> Cc: Peter Zijlstra <> Cc: Thomas Gleixner <> Cc: <> Link: Signed-off-by: Ingo Molnar <>
Diffstat (limited to 'kernel')
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 13d0896aff87..4135ac83cb65 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5147,14 +5147,16 @@ void show_state_filter(unsigned long state_filter)
* reset the NMI-timeout, listing all files on a slow
* console might take a lot of time:
+ * Also, reset softlockup watchdogs on all CPUs, because
+ * another CPU might be blocked waiting for us to process
+ * an IPI.
+ touch_all_softlockup_watchdogs();
if (!state_filter || (p->state & state_filter))
- touch_all_softlockup_watchdogs();
if (!state_filter)