public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] i386: fix a hang on stuck nmi watchdog
@ 2007-09-01 20:54 Daniel Walker
  2007-09-01 21:33 ` Stephane Eranian
  2007-09-01 21:45 ` Andi Kleen
  0 siblings, 2 replies; 5+ messages in thread
From: Daniel Walker @ 2007-09-01 20:54 UTC (permalink / raw)
  To: akpm; +Cc: Andi Kleen, eranian, B.Steinbrink, linux-kernel

In the case when an nmi gets stucks the endflag stays equal to zero. This
causes the busy looping on other cpus to continue, even tho the nmi test
is done.

On my machine with out the change below the system would hang right after
check_nmi_watchdog(). The change below just sets endflag prior to checking
if the test was successful or not.

Signed-off-by: Daniel Walker <dwalker@mvista.com>

---
 arch/i386/kernel/nmi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.22/arch/i386/kernel/nmi.c
===================================================================
--- linux-2.6.22.orig/arch/i386/kernel/nmi.c
+++ linux-2.6.22/arch/i386/kernel/nmi.c
@@ -115,12 +115,12 @@ static int __init check_nmi_watchdog(voi
 			atomic_dec(&nmi_active);
 		}
 	}
+	endflag = 1;
 	if (!atomic_read(&nmi_active)) {
 		kfree(prev_nmi_count);
 		atomic_set(&nmi_active, -1);
 		return -1;
 	}
-	endflag = 1;
 	printk("OK.\n");
 
 	/* now that we know it works we can reduce NMI frequency to
-- 

-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] i386: fix a hang on stuck nmi watchdog
  2007-09-01 21:33 ` Stephane Eranian
@ 2007-09-01 21:26   ` Daniel Walker
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Walker @ 2007-09-01 21:26 UTC (permalink / raw)
  To: eranian; +Cc: akpm, Andi Kleen, B.Steinbrink, linux-kernel

On Sat, 2007-09-01 at 14:33 -0700, Stephane Eranian wrote:
> Daniel,
> 
> Thanks for your help tracking down this bug. Maybe we can close
> the bugzilla report now.

No problem , and thanks for taking the time to dig into it ..

I'll close the bugzilla report.

Daniel


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] i386: fix a hang on stuck nmi watchdog
  2007-09-01 20:54 [PATCH 1/1] i386: fix a hang on stuck nmi watchdog Daniel Walker
@ 2007-09-01 21:33 ` Stephane Eranian
  2007-09-01 21:26   ` Daniel Walker
  2007-09-01 21:45 ` Andi Kleen
  1 sibling, 1 reply; 5+ messages in thread
From: Stephane Eranian @ 2007-09-01 21:33 UTC (permalink / raw)
  To: Daniel Walker; +Cc: akpm, Andi Kleen, B.Steinbrink, linux-kernel

Daniel,

Thanks for your help tracking down this bug. Maybe we can close
the bugzilla report now.

On Sat, Sep 01, 2007 at 01:54:17PM -0700, Daniel Walker wrote:
> In the case when an nmi gets stucks the endflag stays equal to zero. This
> causes the busy looping on other cpus to continue, even tho the nmi test
> is done.
> 
> On my machine with out the change below the system would hang right after
> check_nmi_watchdog(). The change below just sets endflag prior to checking
> if the test was successful or not.
> 
> Signed-off-by: Daniel Walker <dwalker@mvista.com>
> 
> ---
>  arch/i386/kernel/nmi.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6.22/arch/i386/kernel/nmi.c
> ===================================================================
> --- linux-2.6.22.orig/arch/i386/kernel/nmi.c
> +++ linux-2.6.22/arch/i386/kernel/nmi.c
> @@ -115,12 +115,12 @@ static int __init check_nmi_watchdog(voi
>  			atomic_dec(&nmi_active);
>  		}
>  	}
> +	endflag = 1;
>  	if (!atomic_read(&nmi_active)) {
>  		kfree(prev_nmi_count);
>  		atomic_set(&nmi_active, -1);
>  		return -1;
>  	}
> -	endflag = 1;
>  	printk("OK.\n");
>  
>  	/* now that we know it works we can reduce NMI frequency to
> -- 
> 
> -- 

-- 

-Stephane

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] i386: fix a hang on stuck nmi watchdog
  2007-09-01 20:54 [PATCH 1/1] i386: fix a hang on stuck nmi watchdog Daniel Walker
  2007-09-01 21:33 ` Stephane Eranian
@ 2007-09-01 21:45 ` Andi Kleen
  2007-09-01 22:27   ` Daniel Walker
  1 sibling, 1 reply; 5+ messages in thread
From: Andi Kleen @ 2007-09-01 21:45 UTC (permalink / raw)
  To: Daniel Walker; +Cc: akpm, eranian, B.Steinbrink, linux-kernel

On Saturday 01 September 2007 22:54:17 Daniel Walker wrote:
> In the case when an nmi gets stucks the endflag stays equal to zero. This
> causes the busy looping on other cpus to continue, even tho the nmi test
> is done.
> 
> On my machine with out the change below the system would hang right after
> check_nmi_watchdog(). The change below just sets endflag prior to checking
> if the test was successful or not.
> 
> Signed-off-by: Daniel Walker <dwalker@mvista.com>

Added thanks. I guess it's .23 material.

-Andi


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/1] i386: fix a hang on stuck nmi watchdog
  2007-09-01 21:45 ` Andi Kleen
@ 2007-09-01 22:27   ` Daniel Walker
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Walker @ 2007-09-01 22:27 UTC (permalink / raw)
  To: Andi Kleen; +Cc: akpm, eranian, B.Steinbrink, linux-kernel

On Sat, 2007-09-01 at 23:45 +0200, Andi Kleen wrote:
> On Saturday 01 September 2007 22:54:17 Daniel Walker wrote:
> > In the case when an nmi gets stucks the endflag stays equal to zero. This
> > causes the busy looping on other cpus to continue, even tho the nmi test
> > is done.
> > 
> > On my machine with out the change below the system would hang right after
> > check_nmi_watchdog(). The change below just sets endflag prior to checking
> > if the test was successful or not.
> > 
> > Signed-off-by: Daniel Walker <dwalker@mvista.com>
> 
> Added thanks. I guess it's .23 material.

putting it in 2.6.23 seems appropriate .. Stephane's patch might be good
for 2.6.23 too .. 

Daniel


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-09-01 22:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-01 20:54 [PATCH 1/1] i386: fix a hang on stuck nmi watchdog Daniel Walker
2007-09-01 21:33 ` Stephane Eranian
2007-09-01 21:26   ` Daniel Walker
2007-09-01 21:45 ` Andi Kleen
2007-09-01 22:27   ` Daniel Walker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox