mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86: Fix i386 nmi_watchdog that does not trigger die_nmi
@ 2006-03-07  2:13 GOTO Masanori
  2006-03-07  3:46 ` Andi Kleen
  0 siblings, 1 reply; 2+ messages in thread
From: GOTO Masanori @ 2006-03-07  2:13 UTC (permalink / raw)
  To: linux-kernel, akpm; +Cc: gotom

It fixes i386 nmi_watchdog that does not meet watchdog timeout
condition.  It does not hit die_nmi when it should be triggered,
because the current nmi_watchdog_tick in arch/i386/kernel/nmi.c never
count up alert_counter like this:

	void nmi_watchdog_tick (struct pt_regs * regs) {
	if (last_irq_sums[cpu] == sum) {
		alert_counter[cpu]++;		<- count up alert_counter, but
		if (alert_counter[cpu] == 5*nmi_hz)
			die_nmi(regs, "NMI Watchdog detected LOCKUP");
		alert_counter[cpu] = 0;		<- reset alert_counter

This patch changes it back to the previous and working version.
Tested with 2.6.15.  It's also OK for 2.6.16-rc5.

This was found and originally written by Kohta NAKASHIMA.

-- gotom

Signed-Off-By: GOTO Masanori <gotom@sanori.org>
---

--- linux-2.6.15/arch/i386/kernel/nmi.c.gotom	2006-03-02 17:52:49.021365056 +0900
+++ linux-2.6.15/arch/i386/kernel/nmi.c	2006-03-02 17:53:19.939664760 +0900
@@ -544,7 +544,7 @@ void nmi_watchdog_tick (struct pt_regs *
 			 * die_nmi will return ONLY if NOTIFY_STOP happens..
 			 */
 			die_nmi(regs, "NMI Watchdog detected LOCKUP");
-
+	} else {
 		last_irq_sums[cpu] = sum;
 		alert_counter[cpu] = 0;
 	}

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

* Re: [PATCH] x86: Fix i386 nmi_watchdog that does not trigger die_nmi
  2006-03-07  2:13 [PATCH] x86: Fix i386 nmi_watchdog that does not trigger die_nmi GOTO Masanori
@ 2006-03-07  3:46 ` Andi Kleen
  0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2006-03-07  3:46 UTC (permalink / raw)
  To: GOTO Masanori; +Cc: linux-kernel, akpm

GOTO Masanori <gotom@sanori.org> writes:

> It fixes i386 nmi_watchdog that does not meet watchdog timeout
> condition.  It does not hit die_nmi when it should be triggered,
> because the current nmi_watchdog_tick in arch/i386/kernel/nmi.c never
> count up alert_counter like this:
> 
> 	void nmi_watchdog_tick (struct pt_regs * regs) {
> 	if (last_irq_sums[cpu] == sum) {
> 		alert_counter[cpu]++;		<- count up alert_counter, but
> 		if (alert_counter[cpu] == 5*nmi_hz)
> 			die_nmi(regs, "NMI Watchdog detected LOCKUP");
> 		alert_counter[cpu] = 0;		<- reset alert_counter
> 
> This patch changes it back to the previous and working version.
> Tested with 2.6.15.  It's also OK for 2.6.16-rc5.
> 
> This was found and originally written by Kohta NAKASHIMA.

Oops. Looks quite bad. Real 2.6.16 candidate I guess.

-Andi

> 
> -- gotom
> 
> Signed-Off-By: GOTO Masanori <gotom@sanori.org>
> ---
> 
> --- linux-2.6.15/arch/i386/kernel/nmi.c.gotom	2006-03-02 17:52:49.021365056 +0900
> +++ linux-2.6.15/arch/i386/kernel/nmi.c	2006-03-02 17:53:19.939664760 +0900
> @@ -544,7 +544,7 @@ void nmi_watchdog_tick (struct pt_regs *
>  			 * die_nmi will return ONLY if NOTIFY_STOP happens..
>  			 */
>  			die_nmi(regs, "NMI Watchdog detected LOCKUP");
> -
> +	} else {
>  		last_irq_sums[cpu] = sum;
>  		alert_counter[cpu] = 0;
>  	}

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

end of thread, other threads:[~2006-03-07  3:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-07  2:13 [PATCH] x86: Fix i386 nmi_watchdog that does not trigger die_nmi GOTO Masanori
2006-03-07  3:46 ` Andi Kleen

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®