Re: [PATCH v3 07/21] sched/cache: Introduce per CPU's tasks LLC preference counter
From: Peter Zijlstra
Date: Fri Feb 20 2026 - 13:40:20 EST
On Sat, Feb 21, 2026 at 12:57:38AM +0800, Chen, Yu C wrote:
> llc=llc_id(i)
> if(llc<sd->llc_max)
> safe read sd->pf[llc]
Right, except llc_id() is allowed to return negative, so that would need
to be something like:
if ((unsigned)llc < sd->llc_max)
sd->llc_count[llc]