• Chen, Gong's avatar
    x86, CMCI: Add proper detection of end of CMCI storms · 27f6c573
    Chen, Gong authored
    When CMCI storm persists for a long time(at least beyond predefined
    threshold. It's 30 seconds for now), we can watch CMCI storm is
    detected immediately after it subsides.
    
    ...
    Dec 10 22:04:29 kernel: CMCI storm detected: switching to poll mode
    Dec 10 22:04:59 kernel: CMCI storm subsided: switching to interrupt mode
    Dec 10 22:04:59 kernel: CMCI storm detected: switching to poll mode
    Dec 10 22:05:29 kernel: CMCI storm subsided: switching to interrupt mode
    ...
    
    The problem is that our logic that determines that the storm has
    ended is incorrect. We announce the end, re-enable interrupts and
    realize that the storm is still going on, so we switch back to
    polling mode. Rinse, repeat.
    
    When a storm happens we disable signaling of errors via CMCI and begin
    polling machine check banks instead. If we find any logged errors,
    then we need to set a per-cpu flag so that our per-cpu tests that
    check whether the storm is ongoing will see that errors are still
    being logged independently of whether mce_notify_irq() says that the
    error has been fully processed.
    
    cmci_clear() is not the right tool to disable a bank. It disables the
    interrupt for the bank as desired, but it also clears the bit for
    this bank in "mce_banks_owned" so we will skip the bank when polling
    (so we fail to see that the storm continues because we stop looking).
    New cmci_storm_disable_banks() just disables the interrupt while
    allowing polling to continue.
    Reported-by: default avatarWilliam Dauchy <wdauchy@gmail.com>
    Signed-off-by: default avatarChen, Gong <gong.chen@linux.intel.com>
    Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
    27f6c573
mce.c 58 KB