This patch adds a new kernel debug feature: CONFIG_DETECT_SOFTLOCKUP. When enabled then per-CPU watchdog threads are started, which try to run once per second. If they get delayed for more than 10 seconds then a callback from the timer interrupt detects this condition and prints out a warning message and a stack dump (once per lockup incident). The feature is otherwise non-intrusive, it doesnt try to unlock the box in any way, it only gets the debug info out, automatically, and on all CPUs affected by the lockup.
Showing the changes to kernel/timer.c (1 of 12 files). Show all
Unified · Split
| @@ -950,6 +950,7 @@ void do_timer(struct pt_regs *regs) · 949 unmodified lines | ||
| 950 | 950 | { |
| 951 | 951 | jiffies_64++; |
| 952 | 952 | update_times(); |
| 953 | + softlockup_tick(regs); | |
| 953 | 954 | } |
| 954 | 955 | |
| 955 | 956 | #ifdef __ARCH_WANT_SYS_ALARM |