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

46 lines
1.5 KiB
Diff
Raw Normal View History

2010-07-30 00:18:45 +00:00
From 899dd25ae272c73407c1477ec223982d0b57a668 Mon Sep 17 00:00:00 2001
From: Kyle McMartin <kyle@phobos.i.jkkm.org>
Date: Wed, 8 Jul 2009 13:03:06 -0400
Subject: [PATCH 2/6] fedora: 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 b3025b4..e82a450 100644
--- a/arch/x86/kernel/apic/nmi.c
+++ b/arch/x86/kernel/apic/nmi.c
@@ -436,7 +436,7 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
* wait a few IRQs (5 seconds) before doing the oops ...
*/
local_inc(&__get_cpu_var(alert_counter));
- if (local_read(&__get_cpu_var(alert_counter)) == 5 * nmi_hz)
+ if (local_read(&__get_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 12327b2..2790b4f 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -245,6 +245,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.2.5