* [PATCH] fix x86-64 condition to call nmi_watchdog_tick
@ 2005-09-08 16:11 Jan Beulich
2005-09-09 8:43 ` [discuss] " Andi Kleen
0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2005-09-08 16:11 UTC (permalink / raw)
To: Andreas Kleen; +Cc: linux-kernel, discuss
[-- Attachment #1: Type: text/plain, Size: 1721 bytes --]
(Note: Patch also attached because the inline version is certain to get
line wrapped.)
Don't call nmi_watchdog_tick() when this isn't enabled.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
diff -Npru 2.6.13/arch/x86_64/kernel/io_apic.c
2.6.13-x86_64-watchdog-active/arch/x86_64/kernel/io_apic.c
--- 2.6.13/arch/x86_64/kernel/io_apic.c 2005-08-29
01:41:01.000000000 +0200
+++
2.6.13-x86_64-watchdog-active/arch/x86_64/kernel/io_apic.c 2005-09-01
11:32:11.000000000 +0200
@@ -1529,6 +1529,7 @@ static void setup_nmi (void)
*/
printk(KERN_INFO "activating NMI Watchdog ...");
+ nmi_active = 1;
enable_NMI_through_LVT0(NULL);
printk(" done.\n");
diff -Npru 2.6.13/arch/x86_64/kernel/traps.c
2.6.13-x86_64-watchdog-active/arch/x86_64/kernel/traps.c
--- 2.6.13/arch/x86_64/kernel/traps.c 2005-08-29 01:41:01.000000000
+0200
+++
2.6.13-x86_64-watchdog-active/arch/x86_64/kernel/traps.c 2005-09-07
13:30:20.000000000 +0200
@@ -603,7 +603,7 @@ asmlinkage void default_do_nmi(struct pt
* Ok, so this is none of the documented NMI sources,
* so it must be the NMI watchdog.
*/
- if (nmi_watchdog > 0) {
+ if (nmi_watchdog > 0 && nmi_active > 0) {
nmi_watchdog_tick(regs,reason);
return;
}
diff -Npru 2.6.13/include/asm-x86_64/apic.h
2.6.13-x86_64-watchdog-active/include/asm-x86_64/apic.h
--- 2.6.13/include/asm-x86_64/apic.h 2005-08-29 01:41:01.000000000
+0200
+++
2.6.13-x86_64-watchdog-active/include/asm-x86_64/apic.h 2005-09-01
11:32:12.000000000 +0200
@@ -103,6 +103,7 @@ extern void nmi_watchdog_default(void);
extern int setup_nmi_watchdog(char *);
extern unsigned int nmi_watchdog;
+extern int nmi_active;
#define NMI_DEFAULT -1
#define NMI_NONE 0
#define NMI_IO_APIC 1
[-- Attachment #2: linux-2.6.13-x86_64-watchdog-active.patch --]
[-- Type: application/octet-stream, Size: 1720 bytes --]
(Note: Patch also attached because the inline version is certain to get
line wrapped.)
Don't call nmi_watchdog_tick() when this isn't enabled.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
diff -Npru 2.6.13/arch/x86_64/kernel/io_apic.c 2.6.13-x86_64-watchdog-active/arch/x86_64/kernel/io_apic.c
--- 2.6.13/arch/x86_64/kernel/io_apic.c 2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-x86_64-watchdog-active/arch/x86_64/kernel/io_apic.c 2005-09-01 11:32:11.000000000 +0200
@@ -1529,6 +1529,7 @@ static void setup_nmi (void)
*/
printk(KERN_INFO "activating NMI Watchdog ...");
+ nmi_active = 1;
enable_NMI_through_LVT0(NULL);
printk(" done.\n");
diff -Npru 2.6.13/arch/x86_64/kernel/traps.c 2.6.13-x86_64-watchdog-active/arch/x86_64/kernel/traps.c
--- 2.6.13/arch/x86_64/kernel/traps.c 2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-x86_64-watchdog-active/arch/x86_64/kernel/traps.c 2005-09-07 13:30:20.000000000 +0200
@@ -603,7 +603,7 @@ asmlinkage void default_do_nmi(struct pt
* Ok, so this is none of the documented NMI sources,
* so it must be the NMI watchdog.
*/
- if (nmi_watchdog > 0) {
+ if (nmi_watchdog > 0 && nmi_active > 0) {
nmi_watchdog_tick(regs,reason);
return;
}
diff -Npru 2.6.13/include/asm-x86_64/apic.h 2.6.13-x86_64-watchdog-active/include/asm-x86_64/apic.h
--- 2.6.13/include/asm-x86_64/apic.h 2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-x86_64-watchdog-active/include/asm-x86_64/apic.h 2005-09-01 11:32:12.000000000 +0200
@@ -103,6 +103,7 @@ extern void nmi_watchdog_default(void);
extern int setup_nmi_watchdog(char *);
extern unsigned int nmi_watchdog;
+extern int nmi_active;
#define NMI_DEFAULT -1
#define NMI_NONE 0
#define NMI_IO_APIC 1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [discuss] [PATCH] fix x86-64 condition to call nmi_watchdog_tick
2005-09-08 16:11 [PATCH] fix x86-64 condition to call nmi_watchdog_tick Jan Beulich
@ 2005-09-09 8:43 ` Andi Kleen
2005-09-09 8:53 ` Jan Beulich
0 siblings, 1 reply; 3+ messages in thread
From: Andi Kleen @ 2005-09-09 8:43 UTC (permalink / raw)
To: discuss; +Cc: Jan Beulich, linux-kernel
On Thursday 08 September 2005 18:11, Jan Beulich wrote:
> (Note: Patch also attached because the inline version is certain to get
> line wrapped.)
>
> Don't call nmi_watchdog_tick() when this isn't enabled.
Hmm, I think i will concur with Zwane's objection to this for now.
-Andi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [discuss] [PATCH] fix x86-64 condition to call nmi_watchdog_tick
2005-09-09 8:43 ` [discuss] " Andi Kleen
@ 2005-09-09 8:53 ` Jan Beulich
0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2005-09-09 8:53 UTC (permalink / raw)
To: zwane, Andi Kleen; +Cc: linux-kernel, discuss
>>> Andi Kleen <ak@suse.de> 09.09.05 10:43:01 >>>
>On Thursday 08 September 2005 18:11, Jan Beulich wrote:
>> (Note: Patch also attached because the inline version is certain to
get
>> line wrapped.)
>>
>> Don't call nmi_watchdog_tick() when this isn't enabled.
>
>Hmm, I think i will concur with Zwane's objection to this for now.
And I understand the concerns. Nevertheless, the code right now, on
properly working systems and with the watchdog enabled (but not active)
results in bad NMIs to be supressed (because the code returns right
after calling nmi_watchdog_tick). I'd think that on systems as Zwane
describes one should simply not enable the watchdog (and for this reason
I continue to believe that like on i386 the default should be to have no
watchdog).
Jan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-09-09 8:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-08 16:11 [PATCH] fix x86-64 condition to call nmi_watchdog_tick Jan Beulich
2005-09-09 8:43 ` [discuss] " Andi Kleen
2005-09-09 8:53 ` Jan Beulich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®