Re: 答复: 答复: 答复: [外部邮件] Re: [PATCH] x86/mce: Fix timer interval adjustment after logging a MCE event

From: Nikolay Borisov

Date: Tue Jan 13 2026 - 14:37:17 EST




On 13.01.26 г. 21:33 ч., Borislav Petkov wrote:
On Tue, Jan 13, 2026 at 09:25:19PM +0200, Nikolay Borisov wrote:
mce_need_notify even now works just in the early notifier because it's set
in mce_early_notifier() and subsequently reset in mce_notify_irq() which is
called immediately after the set.

You still need to call something in mce_timer_fn() to know whether to halve
the interval or not.

Yes, and why is Li's approach not working, i.e if mc_poll_banks() returns a value signalling "i found an MCE" we halve, otherwise we double it?



I wonder if it would be better/cleaner if mce_early_notifier() halves the
interval and mce_timer_fn() just reads only the current interval value...
maybe that'll be less logic spread around...


That's certainly doable, but why should the interval setting be coupled to the initial notifier and not to mc_poll_banks?