History

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.

Andrey Ryabinin committed 10 years ago

Commit 57675cb1 parent eda8dca1 file · +4 −2Browse files

Unified · Split

kernel/sched/core.c+4−2
@@ -5147,14 +5147,16 @@ void show_state_filter(unsigned long state_filter) · 5146 unmodified lines
51475147 /*
51485148 * reset the NMI-timeout, listing all files on a slow
51495149 * 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.
51505153 */
51515154 touch_nmi_watchdog();
5155+ touch_all_softlockup_watchdogs();
51525156 if (!state_filter || (p->state & state_filter))
51535157 sched_show_task(p);
51545158 }
51555159
5156− touch_all_softlockup_watchdogs();
5157−
51585160 #ifdef CONFIG_SCHED_DEBUG
51595161 if (!state_filter)
51605162 sysrq_sched_debug_show();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t