Re: NMI watchdog question.

John Levon (levon@movementarian.org)
Wed, 6 Nov 2002 20:07:26 +0000


On Wed, Nov 06, 2002 at 11:49:07AM -0800, george anzinger wrote:

> So the performance counters are only used on UP machines?

no. nmi_watchdog=1 -> I/O APIC is used iff available and it works
nmi_watchdog=2 -> local APIC LVTPC set to interrupt in NMI mode when
perfctr overflows.

=2 can be used on both UP and SMP, =1 is only available on UP for the
rare machines that have an I/O APIC on a UP motherboard (I believe there
are some, but I don't know if the code is set up to do so properly).

> Also, what is the point of turning off the nmi in this way
> (i.e. nmi_watchdog = 0;)? If the interrupts are not
> generated the test of the flag will not be done in traps.c.
> Is it tested else where?

NMIs can have other sources. In particular if we get an NMI from an
unknown source, we want to tell the user we're dazed and confused.

Currently, if we boot with nmi_watchdog=2 on SMP /and/ that io_apic.c
code sets nmi_watchdog to 0, it seems we will get an incorrect "dazed
and confused" every time the perfctr overflows (which will take a while
to overflow the full 40 bits, but ...)

[hmm, actually this would depend on exactly what order the setup is
done, I'm too lazy to check]

So I think that test definitely needs to be there, but it needs to be

if (nmi_watchdog == NMI_IO_APIC)

as Maciej ACKed.

regards
john

-- 
"When a man has nothing to say, the worst thing he can do is to say it
memorably."
	- Calvin Trillin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/