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

Borislav Petkov
2026-01-13T20:34:22Z

On Tue, Jan 13, 2026 at 09:51:48PM +0200, Nikolay Borisov wrote:
> grepping around points to your 011d82611172 ("RAS: Add a Corrected Errors
> Collector"). Because looking at the commit log of my 6447828875b7
> ("x86/mce/inject: Remove call to mce_notify_irq()") I mention that
> mce_need_notify got introduced in your commit and it was called
> "notify_user" before that. Before your commit in mce_log there was an
> explicit set_bit(mce_need_notify) call .

It was removed there so that it doesn't issue the

"Machine check events logged\n"

thing because that's the main point of the error collector - to collect errors
in the background and not upset users.

Also, there's an explicit set_bit(mce_need_notify) call in the early notifier.
So it'll get set a bit later, when the notifier chain goes.

But that same notifier does:

set_bit(0, &mce_need_notify);
mce_notify_irq();

so it'll clear that bit immediately.

Which means, the timer would probably never see the need_notify thing and thus
won't halve.

Which begs the question: is the timer even supposed to halve when you have the
error collector?

I guess so - we need it to log errors faster because the assumption is that
you'll be getting more errors so you need to read them out faster.

I need to think about it tomorrow on a clear head...