diff options
author | Wei Li <liwei391@huawei.com> | 2019-12-26 11:52:24 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-01-17 12:19:20 +0300 |
commit | 02d4ac5885a18d326b500b94808f0956dcce2832 (patch) | |
tree | 8bd9f9bb058155c1a9bb39a608dfcb8487432fa0 | |
parent | dcd6dffb0a75741471297724640733fa4e958d72 (diff) | |
download | linux-02d4ac5885a18d326b500b94808f0956dcce2832.tar.xz |
sched/debug: Reset watchdog on all CPUs while processing sysrq-t
Lengthy output of sysrq-t may take a lot of time on slow serial console
with lots of processes and CPUs.
So we need to reset NMI-watchdog to avoid spurious lockup messages, and
we also reset softlockup watchdogs on all other CPUs since another CPU
might be blocked waiting for us to process an IPI or stop_machine.
Add to sysrq_sched_debug_show() as what we did in show_state_filter().
Signed-off-by: Wei Li <liwei391@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Link: https://lkml.kernel.org/r/20191226085224.48942-1-liwei391@huawei.com
-rw-r--r-- | kernel/sched/debug.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index f7e4579e746c..879d3ccf3806 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -751,9 +751,16 @@ void sysrq_sched_debug_show(void) int cpu; sched_debug_header(NULL); - for_each_online_cpu(cpu) + for_each_online_cpu(cpu) { + /* + * Need to reset softlockup watchdogs on all CPUs, because + * another CPU might be blocked waiting for us to process + * an IPI or stop_machine. + */ + touch_nmi_watchdog(); + touch_all_softlockup_watchdogs(); print_cpu(NULL, cpu); - + } } /* |