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

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/sched/core.c+4−2
@@ -5147,14 +5147,16 @@ void show_state_filter(unsigned long state_filter) · 5146 unmodified lines
5147 /*5147 /*
5148 * reset the NMI-timeout, listing all files on a slow5148 * 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_DEBUG5160#ifdef CONFIG_SCHED_DEBUG
5159 if (!state_filter)5161 if (!state_filter)
5160 sysrq_sched_debug_show();5162 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