kernel/linux-2.6-debug-nmi-timeout...

46 lines
1.5 KiB
Diff

From c2dcc88ee3aca407471246c38c11a100cca39076 Mon Sep 17 00:00:00 2001
From: Kyle McMartin <kyle@treachery.i.jkkm.org>
Date: Mon, 11 Jan 2010 08:20:51 -0500
Subject: linux-2.6-debug-nmi-timeout.patch
---
arch/x86/kernel/apic/nmi.c | 2 +-
lib/Kconfig.debug | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c
index 0159a69..2bbca2b 100644
--- a/arch/x86/kernel/apic/nmi.c
+++ b/arch/x86/kernel/apic/nmi.c
@@ -439,7 +439,7 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
* wait a few IRQs (5 seconds) before doing the oops ...
*/
__this_cpu_inc(per_cpu_var(alert_counter));
- if (__this_cpu_read(per_cpu_var(alert_counter)) == 5 * nmi_hz)
+ if (__this_cpu_read(per_cpu_var(alert_counter)) == CONFIG_DEBUG_NMI_TIMEOUT * nmi_hz)
/*
* die_nmi will return ONLY if NOTIFY_STOP happens..
*/
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 25c3ed5..6d67975 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -253,6 +253,14 @@ config SCHEDSTATS
application, you can say N to avoid the very slight overhead
this adds.
+config DEBUG_NMI_TIMEOUT
+ int "Number of seconds before NMI timeout"
+ depends on X86
+ default 5
+ help
+ This value is the number of seconds the NMI watchdog will tick
+ before it decides the machine has hung.
+
config TIMER_STATS
bool "Collect kernel timers statistics"
depends on DEBUG_KERNEL && PROC_FS
--
1.6.5.2