From: Roland Dreier <rdreier@cisco.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Andi Kleen <ak@suse.de>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
Arjan van de Ven <arjan@infradead.org>,
Adrian Bunk <bunk@stusta.de>, Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: [patch] disable NMI watchdog by default
Date: Tue, 06 Mar 2007 19:06:58 -0800 [thread overview]
Message-ID: <ada1wk1ycod.fsf@cisco.com> (raw)
In-Reply-To: <20070305122011.GA16133@elte.hu> (Ingo Molnar's message of "Mon, 5 Mar 2007 13:20:11 +0100")
> --- 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.
next prev parent reply other threads:[~2007-03-07 3:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-05 12:20 [patch] disable NMI watchdog by default Ingo Molnar
2007-03-05 14:49 ` Arjan van de Ven
2007-03-05 17:42 ` Len Brown
2007-03-05 19:54 ` Andi Kleen
2007-03-05 20:26 ` Ingo Molnar
2007-03-05 20:40 ` Linus Torvalds
2007-03-07 3:06 ` Roland Dreier [this message]
2007-03-07 14:56 ` Andi Kleen
-- strict thread matches above, loose matches on Subject: below --
2007-01-14 9:29 Ingo Molnar
2007-01-14 14:45 ` Henrique de Moraes Holschuh
2007-01-14 16:45 ` Arjan van de Ven
2007-03-05 16:02 ` Bill Davidsen
2007-03-08 19:44 ` Avi Kivity
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ada1wk1ycod.fsf@cisco.com \
--to=rdreier@cisco.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=arjan@infradead.org \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox