summaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorAndrey Ryabinin <aryabinin@virtuozzo.com>2016-06-09 08:20:05 -0400
committerIngo Molnar <mingo@kernel.org>2016-06-14 06:48:38 -0400
commit57675cb976eff977aefb428e68e4e0236d48a9ff (patch)
tree3c61c93aabc2b6597a249492454db2ebf14d347f /kernel/sched
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 <aryabinin@virtuozzo.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: <stable@vger.kernel.org> Link: http://lkml.kernel.org/r/1465474805-14641-1-git-send-email-aryabinin@virtuozzo.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/core.c6
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)
5147 /* 5147 /*
5148 * reset the NMI-timeout, listing all files on a slow 5148 * reset the NMI-timeout, listing all files on a slow
5149 * console might take a lot of time: 5149 * console might take a lot of time:
5150 * Also, reset softlockup watchdogs on all CPUs, because
5151 * another CPU might be blocked waiting for us to process
5152 * an IPI.
5150 */ 5153 */
5151 touch_nmi_watchdog(); 5154 touch_nmi_watchdog();
5155 touch_all_softlockup_watchdogs();
5152 if (!state_filter || (p->state & state_filter)) 5156 if (!state_filter || (p->state & state_filter))
5153 sched_show_task(p); 5157 sched_show_task(p);
5154 } 5158 }
5155 5159
5156 touch_all_softlockup_watchdogs();
5157
5158#ifdef CONFIG_SCHED_DEBUG 5160#ifdef CONFIG_SCHED_DEBUG
5159 if (!state_filter) 5161 if (!state_filter)
5160 sysrq_sched_debug_show(); 5162 sysrq_sched_debug_show();