[PATCH v1 3/8] x86/mce/intel: Bound cmci_rediscover() to a single topology peer

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Oct 15 08:51:19 PDT 2026


> When a CPU goes offline, cmci_clear() disables CMCI on any MCA banks
> owned by that CPU, and mce_cpu_dead() calls cmci_rediscover(). Currently
> cmci_rediscover() invokes on_each_cpu(cmci_rediscover_work_func, NULL, 1),
> sending a synchronous broadcast IPI to every online CPU in the system,
> all of which contend on the global cmci_discover_lock while reading up
> to 32 MSR_IA32_MCx_CTL2 MSRs.
> 
> Any bank disabled by cmci_clear() is either thread-private, core-scoped
> (shared between SMT threads of the same physical core), L2-cluster-scoped,
> die-scoped, or package-scoped:
> 1. Any bank index that is already owned by the target peer in its own
>    mce_banks_owned bitmap is private to a narrower scope than the shared
>    level and will be skipped by cmci_skip_bank() on the target anyway.
> 2. Core- or cluster-shared MCA banks can only be claimed by an online
>    SMT sibling or L2 cluster peer.
> [ ... ]
>   Total:    22.50 s -> 20.74 s (-7.8%)
>   cmci_rediscover() (cpu479 offline):
>     7,720.6 us -> 0.6 us (-99.99%)
> 
> Signed-off-by: Pasha Tatashin <pasha.tatashin at soleen.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261015153331.1872641-1-pasha.tatashin@soleen.com?part=3




More information about the kexec mailing list