• Akiyama Nobuyuki's avatar
    [PATCH] NMI trigger switch support for debugging(updated) · 7f2b65bd
    Akiyama Nobuyuki authored
    I made a patch for debugging with the help of NMI trigger switch.
    When kernel hangs severely, keyboard operation(e.g.Ctrl-Alt-Del)
    doesn't work properly. This patch enables debugging information
    to be displayed on console in this case.
    I think this feature is necessary as standard functionality.
    Please feel free to use this patch and let me know if you have
    any comments.
    
    Background:
    
    When a trouble occurs in kernel, we usually begin to investigate
    with following information:
     - panic >> panic message.
     - oops >> CPU registers and stack trace.
     - hang >> **NONE** no standard method established.
    
    How it works:
    
    Most IA32 servers have a NMI switch that fires NMI interrupt up.
    The NMI interrupt can interrupt even if kernel is serious state,
    for example deadlock under the interrupt disabled.
    When the NMI switch is pressed after this feature is activated,
    CPU registers and stack trace are displayed on console and then
    panic occurs.
    This feature is activated or deactivated with sysctl.
    
    On IA32 architecture, only the following are defined as reason
    of NMI interrupt:
     - memory parity error
     - I/O check error
    The reason code of NMI switch is not defined, so this patch assumes
    that all undefined NMI interrupts are fired by MNI switch.
    However, oprofile and NMI watchdog also use undefined NMI interrupt.
    Therefore this feature cannot be used at the same time with oprofile
    and NMI watchdog. This feature hands NMI interrupt over to oprofile
    and NMI watchdog. So, when they have been activated, this feature
    doesn't work even if it is activated.
    
    Supported architecture:
    
    IA32
    
    Setup:
    
    Set up the system control parameter as follows:
    
    # sysctl -w kernel.unknown_nmi_panic=1
    kernel.unknown_nmi_panic = 1
    
    If the NMI switch is pressed, CPU registers and stack trace will
    be displayed on console and then panic occurs.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    7f2b65bd
proc.txt 75 KB