RE: [PATCH] x86/mce: Restore MCA polling interval halving

Zhuo, Qiuxu
2026-04-21T15:49:14Z

Hi Boris,

> From: Borislav Petkov <bp@alien8.de>
> [...]
> > mce_timer_fn()
> > machine_check_poll()
> > mce_log()
> > irq_work_queue(&mce_irq_work)
> > ...
> > mce_irq_work_cb()
> > mce_schedule_work()
> > schedule_work(&mce_work)
> > ...
> > mce_gen_pool_process() // [3] worker thread concurrently
> running on any CPU handles MCE logs.
> >
> > mce_gen_pool_empty() // [4]
> >
> > It seems there is a race between [3] and [4].
> > Although my testing did not observe this race, it's possible that
> > mce_timer_fn() (in softirq) completes fast enough that it always
> > finishes before [1] (in worker thread) is scheduled to run.
>
> Does this and the next message in the thread explain the situation?

Yes. Thanks for pointing out this link.

> https://lore.kernel.org/r/20260207115142.GBaYcnTp7maUDVv3Nc@fat_crate.l
> ocal
>
> Bottom line: I don't think this was ever meant to be anything but a rough and
> simple method to catch too many errors being logged and halve the polling
> interval.

Agree.

> IOW, even if the above race happens, in the abundance of too many errors, it
> would pick up and start halving eventually.
>
> Right?
>

Yes, I think so.

So, to me, the current rough and simple method for catching frequent error cases is a good
trade-off between accuracy and complexity.

Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Tested-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>

Thanks!
-Qiuxu