[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ada1wk1ycod.fsf@cisco.com>
Date: Tue, 06 Mar 2007 19:06:58 -0800
From: Roland Dreier <rdreier@...co.com>
To: Ingo Molnar <mingo@...e.hu>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Andi Kleen <ak@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org,
Arjan van de Ven <arjan@...radead.org>,
Adrian Bunk <bunk@...sta.de>,
Alan Cox <alan@...rguk.ukuu.org.uk>
Subject: Re: [patch] disable NMI watchdog by default
> --- linux.orig/include/asm-x86_64/nmi.h
> +++ linux/include/asm-x86_64/nmi.h
> @@ -63,7 +63,7 @@ extern int setup_nmi_watchdog(char *);
>
> extern atomic_t nmi_active;
> extern unsigned int nmi_watchdog;
> -#define NMI_DEFAULT -1
> +#define NMI_DEFAULT 0
Maybe I'm missing something obvious, but this patch doesn't seem
correct to me. The sentiment of disabling the NMI watchdog by default
is fine, and I agree with it, but I don't think this patch does what
it says. First of all, I have a system running a kernel with this
patch applied (v2.6.21-rc2-gc3442e2), and I see NMIs in
/proc/interrupts and "testing NMI watchdog ... OK." in the log.
And second, looking at the NMI code, it seems that this change
actually makes it impossible to turn off the NMI watchdog! In
arch/x86_64/kernel/nmi.c, we have:
void nmi_watchdog_default(void)
{
if (nmi_watchdog != NMI_DEFAULT)
return;
if (nmi_known_cpu())
nmi_watchdog = NMI_LOCAL_APIC;
else
nmi_watchdog = NMI_IO_APIC;
}
so it seems changing the value of NMI_DEFAULT has no effect on this
logic, really: if nmi_watchdog is left at the default, then the kernel
chooses LAPIC or IO-APIC. And if someone passes "nmi_watchdog=0" on
the command line, nmi_watchdog is still NMI_DEFAULT and so the same
logic triggers.
Ingo, I assume you tested this, so what am I missing?
- R.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists