All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: fix setup NMI_LOCAL_APIC watchdog
@ 2011-02-03 15:07 Hillf Danton
  2011-02-08 17:38 ` Don Zickus
  0 siblings, 1 reply; 2+ messages in thread
From: Hillf Danton @ 2011-02-03 15:07 UTC (permalink / raw)
  To: x86, linux-kernel

when testing NMI watchdog, at leat for NMI_LOCAL_APIC, the default
value of nmi_active could prevent the dog from being tested. Even
could not, lapic_adjust_nmi_hz() could misplay its role since the
underlying hardware is still not initialized by lapic_watchdog_init().

And for same reason the check for wd_ops could be removed in
enable_lapic_nmi_watchdog(), in which nmi_active is also checked.

If NMI_LOCAL_APIC is enabled thru sysctl on cmdline after bootup, how
to test stuckup?

Signed-off-by: Hillf Danton <dhillf@gmail.com>
---

--- a/arch/x86/kernel/apic/nmi.c	2011-01-05 08:50:20.000000000 +0800
+++ b/arch/x86/kernel/apic/nmi.c	2011-02-03 22:51:42.000000000 +0800
@@ -171,7 +171,7 @@ int __init check_nmi_watchdog(void)
 	 * something more reasonable; makes a difference in some configs
 	 */
 	if (nmi_watchdog == NMI_LOCAL_APIC)
-		nmi_hz = lapic_adjust_nmi_hz(1);
+		nmi_hz = 1;

 	kfree(prev_nmi_count);
 	return 0;
--- a/arch/x86/kernel/cpu/perfctr-watchdog.c	2011-01-05 08:50:20.000000000 +0800
+++ b/arch/x86/kernel/cpu/perfctr-watchdog.c	2011-02-03 22:48:44.000000000 +0800
@@ -196,14 +196,6 @@ void enable_lapic_nmi_watchdog(void)
 	if (atomic_read(&nmi_active) != 0)
 		return;

-	/* are we lapic aware */
-	if (!wd_ops)
-		return;
-	if (!wd_ops->reserve()) {
-		printk(KERN_ERR "NMI watchdog: cannot reserve perfctrs\n");
-		return;
-	}
-
 	on_each_cpu(setup_apic_nmi_watchdog, NULL, 1);
 	touch_nmi_watchdog();
 }

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

* Re: [PATCH] x86: fix setup NMI_LOCAL_APIC watchdog
  2011-02-03 15:07 [PATCH] x86: fix setup NMI_LOCAL_APIC watchdog Hillf Danton
@ 2011-02-08 17:38 ` Don Zickus
  0 siblings, 0 replies; 2+ messages in thread
From: Don Zickus @ 2011-02-08 17:38 UTC (permalink / raw)
  To: Hillf Danton; +Cc: x86, linux-kernel

On Thu, Feb 03, 2011 at 11:07:11PM +0800, Hillf Danton wrote:
> when testing NMI watchdog, at leat for NMI_LOCAL_APIC, the default
> value of nmi_active could prevent the dog from being tested. Even
> could not, lapic_adjust_nmi_hz() could misplay its role since the
> underlying hardware is still not initialized by lapic_watchdog_init().
> 
> And for same reason the check for wd_ops could be removed in
> enable_lapic_nmi_watchdog(), in which nmi_active is also checked.
> 
> If NMI_LOCAL_APIC is enabled thru sysctl on cmdline after bootup, how
> to test stuckup?

Your patch doesn't apply to 2.6.38 any more because that code has been
removed.  We have switched to the new nmi_watchdog.  Unless you have other
concerns, I am going to drop your patch.

Cheers,
Don

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

end of thread, other threads:[~2011-02-08 17:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-03 15:07 [PATCH] x86: fix setup NMI_LOCAL_APIC watchdog Hillf Danton
2011-02-08 17:38 ` Don Zickus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.