aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2005-09-06 18:16:27 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 19:57:17 -0400
commit8446f1d391f3d27e6bf9c43d4cbcdac0ca720417 (patch)
tree738853af877c9a391b4f2db467e7f90c6e2e38ed /arch/x86_64
parent4732efbeb997189d9f9b04708dc26bf8613ed721 (diff)
[PATCH] detect soft lockups
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. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-Off-By: Matthias Urlichs <smurf@smurf.noris.de> Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64')
-rw-r--r--arch/x86_64/kernel/nmi.c2
-rw-r--r--arch/x86_64/kernel/time.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c
index 64a8e05d5811..84cae81fff8b 100644
--- a/arch/x86_64/kernel/nmi.c
+++ b/arch/x86_64/kernel/nmi.c
@@ -463,6 +463,8 @@ void touch_nmi_watchdog (void)
463 */ 463 */
464 for (i = 0; i < NR_CPUS; i++) 464 for (i = 0; i < NR_CPUS; i++)
465 per_cpu(nmi_touch, i) = 1; 465 per_cpu(nmi_touch, i) = 1;
466
467 touch_softlockup_watchdog();
466} 468}
467 469
468void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason) 470void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason)
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c
index 66bf6ddeb0c3..2b5d9da912a2 100644
--- a/arch/x86_64/kernel/time.c
+++ b/arch/x86_64/kernel/time.c
@@ -1041,6 +1041,7 @@ static int timer_resume(struct sys_device *dev)
1041 write_sequnlock_irqrestore(&xtime_lock,flags); 1041 write_sequnlock_irqrestore(&xtime_lock,flags);
1042 jiffies += sleep_length; 1042 jiffies += sleep_length;
1043 wall_jiffies += sleep_length; 1043 wall_jiffies += sleep_length;
1044 touch_softlockup_watchdog();
1044 return 0; 1045 return 0;
1045} 1046}
1046 1047