Re: [PATCH v1 0/8] x86, sched, mm: Speed up CPU hotplug on large systems

From: Pasha Tatashin

Date: Sun Oct 18 2026 - 10:02:59 EST


On 10-15 14:33, Luck, Tony wrote:
> On Thu, Oct 15, 2026 at 11:33:23AM -0400, Pasha Tatashin wrote:
> > - Patch 3 bounds cmci_rediscover() on CPU teardown. Currently,
> > cmci_rediscover() broadcasts an IPI via on_each_cpu() to all online
> > CPUs, serializing them on cmci_discover_lock while reading up to 32
> > MCA MSRs. Because any disabled MCA bank is shared at most with an
> > SMT sibling, L2 cluster peer, or die/package peer, probing a single
> > online topology peer via smp_call_function_single() (or returning
> > immediately when no shared banks were orphaned) reduces 479-CPU
> > offline time on Intel from 11.42 s to 9.63 s (-15.7%) and total time
> > from 22.50 s to 20.74 s (-7.8%).
>
> I took this series for a spin on a timy 2-socket Icelake (36 cores, 72
> threads per socket). My test was to just offfline/online the 72 logical
> CPUs on socket 1, and I saw some good speedups:
>
> offline: 4.833s -> 3.17s
> online: 6.157s -> 3.796s
>
> I noticed that your cmci_rediscover() improvements mean even better
> offline performance if you work from high to low CPU numbers as the
> shared banks are assigned to the lowest numbered CPU within the sharing
> topology domain. So working from high to low avoids creating as many
> orphan banks that then need to find new owners.
>
> reverse order offline: 2.984s
>
> I haven't looked into the code yet. But the general direction seems
> good.

Thank you for the data, and your point about the ordering is spot on.
However, once single-thread performance is adequate, my end goal is to
parallelize the operation so the number of CPUs won't significantly
affect the total time it takes to remove them and add them back to the
scheduler. This is crucial for the live update work, as transferring CPUs
to Caretaker is part of the brownout, and in some configurations, the
blackout of the live update process.

Pasha

>
> -Tony