Re: [PATCH v2 4/4] sched/rt: Split cpupri_vec->cpumask to per NUMA node to reduce contention

From: Peter Zijlstra

Date: Fri Mar 20 2026 - 08:43:31 EST


On Mon, Jul 21, 2025 at 02:10:26PM +0800, Pan Deng wrote:

> This change splits `cpupri_vec->cpumask` into per-NUMA-node data to
> mitigate false sharing.

So I really do think we need something here. We're running into the
whole cpumask contention thing on a semi regular basis.

But somehow I doubt this is it.

I would suggest building a radix tree like structure based on ACPIID
-- which is inherently suitable for this given that is exactly how
CPUID-0b/1f are specified.

This of course makes it very much x86 specific, but perhaps other
architectures can provide similarly structured id spaces suitable for
this.

If you make it so that it reduces to a single large level (equivalent to
the normal bitmaps) when no intermediate masks are specific, it should
work for all, and then architectures can opt-in by providing a suitable
id space and masks.