Re: [PATCH v2 16/23] sched/cache: Introduce sched_cache_present to enable cache aware scheduling for multi LLCs NUMA node
From: Peter Zijlstra
Date: Wed Dec 10 2025 - 11:56:38 EST
On Wed, Dec 10, 2025 at 05:32:35PM +0100, Peter Zijlstra wrote:
> On Wed, Dec 03, 2025 at 03:07:35PM -0800, Tim Chen wrote:
> > From: Chen Yu <yu.c.chen@xxxxxxxxx>
> >
> > Cache-aware load balancing should only be enabled if there are more
> > than 1 LLCs within 1 NUMA node. sched_cache_present is introduced to
> > indicate whether this platform supports this topology.
> >
> > Suggested-by: Libo Chen <libo.chen@xxxxxxxxxx>
> > Suggested-by: Adam Li <adamli@xxxxxxxxxxxxxxxxxxxxxx>
> > Signed-off-by: Chen Yu <yu.c.chen@xxxxxxxxx>
> > Signed-off-by: Tim Chen <tim.c.chen@xxxxxxxxxxxxxxx>
> > ---
> >
> > Notes:
> > v1->v2:
> > Use flag sched_cache_present to indicate whether a platform
> > supports cache aware scheduling. Change this flag from staic key.
> > There should be only 1 static key to control the cache aware
> > scheduling. (Peter Zijlstra)
> >
> > kernel/sched/topology.c | 20 +++++++++++++++-----
> > 1 file changed, 15 insertions(+), 5 deletions(-)
> >
> > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> > index d583399fc6a1..9799e3a9a609 100644
> > --- a/kernel/sched/topology.c
> > +++ b/kernel/sched/topology.c
> > @@ -24,6 +24,8 @@ int max_llcs;
> >
> > #ifdef CONFIG_SCHED_CACHE
> >
> > +static bool sched_cache_present;
>
> sched_energy_present
> sched_asym_cpucapacity
> sched_cluster_active
> sched_smt_present
>
> are all static keys tied to the current topology, why break the streak
> and make this a boolean?
Also, patch doesn't use sched_cache_present at all, so perhaps just drop
it on the floor entirely?