Re: [PATCH V2] x86/mce: Serialize sysfs controls against CPU hotplug
From: Yazen Ghannam
Date: Thu Oct 29 2026 - 14:08:25 EST
On Thu, Oct 29, 2026 at 10:46:46AM -0700, Borislav Petkov wrote:
> On Thu, Oct 29, 2026 at 12:56:36PM -0400, Yazen Ghannam wrote:
> > The diff below fixes both.
>
> No, we've been trying hard to fix this shit and I already told tglx offlist,
> I am that >.< close from simply disabling any hotplug operations as long as
> someone touches those sysfs files.
>
> There is no good reason to be toggling those continuously and f*ck around with
> CPU hotplug at the same time. You do those configurations and then done. Not
> whack them all the time.
>
> So this code needs to be simplified - not made an even crazier and
> unmaintainable mess.
>
> So, I don't know yet in detail how we are going to query the hotplug core
> whether operations are in progress but once we do, those sysfs helpers should
> simply do:
>
> if (hotplug_operations_in_progress)
> return -ECOMEBACKLATER;
>
> And that hotplug_operations_in_progress should include partial hotplug. I.e.,
> has someone done partial hotplug? If so, error too.
>
> And that's it.
>
> Thx.
>
Right, so what if we deprecate this legacy machinecheck bus and put MCE
stuff under the CPU bus? This could be like cpufreq and cpuidle.
I expect this would need a lot more changes, but the end result may be
simpler.
Thanks,
Yazen