Skip to content

crash_stop: Summary

Keith Owens linux-arch 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest12 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12crash_stop: common headerinclude/linux/crash_stop.h+71 -00 replies
2/12crash_stop: common codekernel/Makefile kernel/crash_stop.c kernel/sys.c+848 -10 replies
3/12crash_stop: i386 interrupt handlersarch/i386/kernel/smp.c arch/i386/kernel/smpboot.c include/asm-i386/hw_irq.h +3 more+35 -00 replies
4/12crash_stop: i386 specific codearch/i386/kernel/Makefile arch/i386/kernel/crash_stop.c include/asm-i386/crash_stop.h+142 -00 replies
5/12crash_stop: add DIE_NMIWATCHDOG to x86_64arch/x86_64/kernel/traps.c+5 -10 replies
6/12crash_stop: x86_64 interrupt handlersarch/x86_64/kernel/entry.S arch/x86_64/kernel/i8259.c arch/x86_64/kernel/smp.c +1 more+34 -20 replies
7/12crash_stop: x86_64 specific codearch/x86_64/kernel/Makefile arch/x86_64/kernel/crash_stop.c include/asm-x86_64/crash_stop.h+143 -00 replies
8/12crash_stop: ia64 interrupt handlersarch/ia64/kernel/smp.c+35 -00 replies
9/12crash_stop: ia64 specific codearch/ia64/kernel/Makefile arch/ia64/kernel/crash_stop.c include/asm-ia64/crash_stop.h+249 -00 replies
10/12crash_stop: add to config systemlib/Kconfig.debug+7 -00 replies
11/12crash_stop: demonstration codekernel/Makefile kernel/crash_stop.c kernel/crash_stop_demo.c +1 more+151 -10 replies
12/12crash_stop: test codekernel/Makefile kernel/crash_stop_test.c lib/Kconfig.debug+189 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [patch 2.6.19-rc5 0/12] crash_stop: Summary

All the kernel debug style tools (kdb, kgdb, nlkd, netdump, lkcd, crash, kdump etc.) have a common requirement, they need to do a crash stop of the systems. This means stopping all the cpus, even if some of the cpus are spinning disabled. In addition, each cpu has to save enough state to start the diagnosis of the problem.

* Each debug style tool has written its own code for interrupting the other cpus and for saving cpu state.

* Some tools try a normal IPI first then send a non-maskable interrupt after a delay.

* Some tools always send a NMI first, which can result in incomplete or wrong machine state if NMI arrives at the wrong time.

* Most of the tools do not know how to cope with the IA64 architecture defined rendezvous algorithm, which interferes with an OS driven rendezvous.

* Needless to say, every single patch set conflicts with all the others, which makes it very difficult to install more than one of the tools at a time.

The solution is to define a common crash_stop API that can be used by _all_ of the debug style tools, without reinventing the wheel each time. The following crash_stop patches implement this API for i386, x86_64 and ia64. It correctly handles the complicated ia64 algorithm for MCA and INIT, unlike almost every current debug style tool.

Adding other architectures is a fairly simple matter, define the IPI and NMI routines (the crash_stop_$(ARCH)_handlers patch), intercept the events that indicate that the system is dying (the crash_stop_$(ARCH) patch), update the Kconfig entry for CRASH_STOP to add the new $(ARCH).

Most of the design documentation is in the crash_stop_common patch. Please read that before replying.

crash_stop_header The architecture independent header.

crash_stop_common The architecture independent code.

crash_stop_i386_handlers i386 specific code to send and respond
to the crash_stop IPI and NMI.

crash_stop_i386 i386 specific code to intercept events
that indicate that the system is dying.

crash_stop_x86_64_nmiwatchdog i386 creates an event for NMI watchdog,
it is missing from x86_64. Add DIE_NMIWATCHDOG to x86_64.

crash_stop_x86_64_handlers x86_64 specific code to send and
respond to the crash_stop IPI and NMI.

crash_stop_x86_64 x86_64 specific code to intercept
events that indicate that the system is dying.

crash_stop_ia64_handlers ia64 specific code to send and respond
to the crash_stop IPI and NMI.

crash_stop_ia64 ia64 specific code to intercept events
that indicate that the system is dying.

crash_stop_common_Kconfig Add crash_stop to the config system.
Only for i386, x86_64 and ia64 at the moment, extend as new architectures are added.

crash_stop_demo A demonstration of using crash_stop in
a debug style tool. Not for inclusion in the kernel.

crash_stop_test Test the crash_stop code. Not for
inclusion in the kernel.