Re: [PATCH v3 04/21] sched/cache: Make LLC id continuous
From: Tim Chen
Date: Thu Feb 19 2026 - 13:17:23 EST
On Thu, 2026-02-19 at 12:35 +0100, Peter Zijlstra wrote:
> On Tue, Feb 10, 2026 at 02:18:44PM -0800, Tim Chen wrote:
> > From: Chen Yu <yu.c.chen@xxxxxxxxx>
> >
> > Introduce an index mapping between CPUs and their LLCs. This provides
> > a continuous per LLC index needed for cache-aware load balancing in
> > later patches.
> >
> > The existing per_cpu llc_id usually points to the first CPU of the
> > LLC domain, which is sparse and unsuitable as an array index. Using
> > llc_id directly would waste memory.
> >
> > With the new mapping, CPUs in the same LLC share a continuous id:
> >
> > per_cpu(llc_id, CPU=0...15) = 0
> > per_cpu(llc_id, CPU=16...31) = 1
> > per_cpu(llc_id, CPU=32...47) = 2
> > ...
> >
> > Once a CPU has been assigned an llc_id, this ID persists even when
> > the CPU is taken offline and brought back online, which can facilitate
> > the management of the ID.
> >
> > Co-developed-by: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
> > Signed-off-by: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
> > Co-developed-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
> > Signed-off-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
> > Signed-off-by: Chen Yu <yu.c.chen@xxxxxxxxx>
>
> Note that Tim is the one sending this email, so his SOB should be last.
> It is also fine to have a SOB occur multiple times in a chain.
>
> Please double check all these SOB chains, because I think this isn't the
> first one that isn't right (possibly the very first patch already has
> problems).
Sorry about that. Will correct this on the next version.
Tim