答复: 答复: [外部邮件] Re: [PATCH] x86/mce: Fix timer interval adjustment after logging a MCE event
From: Li,Rongqing
Date: Mon Jan 12 2026 - 05:26:08 EST
> On Mon, Jan 12, 2026 at 09:36:21AM +0000, Li,Rongqing wrote:
> > Ok, I will add more explanation, and rename mce_notify_irq() as
> > mce_notify_user();
>
> No, first you should explain what you're fixing here and why.
>
> --
> Regards/Gruss,
> Boris.
>
How about modifying the changelog as follows
x86/mce: Fix timer interval adjustment after logging a MCE event
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")
> https://people.kernel.org/tglx/notes-about-netiquette