No description
Find a file
Tomas Hruby 5efa92f754 NMI watchdog is an awesome feature for debugging locked up kernels.
There is not that much use for it on a single CPU, however, deadlock
between kernel and system task can be delected. Or a runaway loop.

If a kernel gets locked up the timer interrupts don't occure (as all
interrupts are disabled in kernel mode). The only chance is to
interrupt the kernel by a non-maskable interrupt.

This patch generates NMIs using performance counters. It uses the most
widely available performace counters. As the performance counters are 
highly model-specific this patch is not guaranteed to work on every
machine.  Unfortunately this is also true for KVM :-/ On the other
hand adding this feature for other models is not extremely difficult
and the framework makes it hopefully easy enough.

Depending on the frequency of the CPU an NMI is generated at most
about every 0.5s If the cpu's speed is less then 2Ghz it is generated
at most every 1s. In general an NMI is generated much less often as
the performance counter counts down only if the cpu is not idle.
Therefore the overhead of this feature is fairly minimal even if the
load is high.

Uppon detecting that the kernel is locked up the kernel dumps the 
state of the kernel registers and panics.

Local APIC must be enabled for the watchdog to work.

The code is _always_ compiled in, however, it is only enabled if  
watchdog=<non-zero> is set in the boot monitor.

One corner case is serial console debugging. As dumping a lot of stuff
to the serial link may take a lot of time, the watchdog does not 
detect lockups during this time!!! as it would result in too many
false positives. 10 nmi have to be handled before the lockup is
detected. This means something between ~5s to 10s.

Another corner case is that the watchdog is enabled only after the
paging is enabled as it would be pure madness to try to get it right.
2010-01-16 20:53:55 +00:00
boot start a.out2com script with 'sh' (Bug#365.1, reported by Antoine Leca) 2010-01-05 09:21:55 +00:00
commands - Make packman unmount the packages cd if it was mounted. 2010-01-13 15:52:55 +00:00
docs Drivers and servers are simply known as services. 2009-12-17 01:53:26 +00:00
drivers Added a missing return statement in paired_grant(). 2010-01-15 21:45:30 +00:00
etc Give SETALARM privilege to atl2 driver 2010-01-16 14:31:35 +00:00
include _cpuid() - full cpuid instruction wrapper 2010-01-15 15:23:57 +00:00
kernel NMI watchdog is an awesome feature for debugging locked up kernels. 2010-01-16 20:53:55 +00:00
lib make C function setgroups() be _setgroups(), called by the asm stub. 2010-01-15 17:16:15 +00:00
man - Make packman unmount the packages cd if it was mounted. 2010-01-13 15:52:55 +00:00
servers Merge of Wu's GSOC 09 branch (src.20090525.r4372.wu) 2010-01-14 15:24:16 +00:00
test Merge of Wu's GSOC 09 branch (src.20090525.r4372.wu) 2010-01-14 15:24:16 +00:00
tools unbreak building CDs 2009-12-23 23:59:32 +00:00
LICENSE Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00
Makefile Removal of the executable flag from files that cannot be executed 2009-11-09 10:26:00 +00:00