Re: [v2 PATCH] x86/mce: Fix timer interval adjustment after logging a MCE event
From: Borislav Petkov
Date: Tue Jan 13 2026 - 04:52:54 EST
On Tue, Jan 13, 2026 at 02:05:06AM -0500, lirongqing wrote:
> From: Li RongQing <lirongqing@xxxxxxxxx>
>
> Since commit 011d82611172 ("RAS: Add a Corrected Errors Collector"),
> mce_timer_fn() has incorrectly determined whether to adjust the
> timer interval. The issue arises because mce_notify_irq() now always
> returns false when called from the timer path, since the polling code
> never sets bit 0 of mce_need_notify. This prevents proper adjustment of
> the timer interval based on whether MCE events were logged.
>
> The mce_notify_irq() is called from two contexts:
> 1. Early notifier block - correctly sets mce_need_notify
> 2. Timer function - never sets mce_need_notify, making it a noop
> (though logged errors are still processed through mce_log()->
> x86_mce_decoder_chain -> early notifier).
>
> Fix this by modifying machine_check_poll() to return a boolean indicating
> whether any MCE was logged, and updating mc_poll_banks() and related
> functions to propagate this return value. Then, mce_timer_fn() can use
> this direct return value instead of relying on mce_notify_irq() for
> timer interval decisions.
>
> This ensures the timer interval is correctly reduced when MCE events are
> logged and increased when no events occur.
>
> Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector")
> Signed-off-by: Li RongQing <lirongqing@xxxxxxxxx>
> ---
> Diff with v1: rewrite commit message
>
> arch/x86/include/asm/mce.h | 2 +-
> arch/x86/kernel/cpu/mce/core.c | 17 +++++++++++------
> arch/x86/kernel/cpu/mce/intel.c | 8 ++++++--
> arch/x86/kernel/cpu/mce/internal.h | 2 +-
> 4 files changed, 19 insertions(+), 10 deletions(-)
We're discussing the issue here:
https://lore.kernel.org/r/268e2f0512db435685af987a2ba6893c@xxxxxxxxx
Why are you sending another patch before we haven't agreed on whether there's
an issue in the first place?!
NAK!
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette