Skip to content

Commit

Permalink
sched/debug: Reset watchdog on all CPUs while processing sysrq-t
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Wei Li authored and Peter Zijlstra committed Jan 17, 2020
1 parent dcd6dff commit 02d4ac5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions kernel/sched/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

}
}

/*
Expand Down

0 comments on commit 02d4ac5

Please sign in to comment.