From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E9172D321B for ; Wed, 10 Dec 2025 16:33:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.92.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765384392; cv=none; b=PhEf9Hsd1bXS7L/0a52PJGzovGP7+3w3PrXAMWuL7yKQczfWA9SJ4VoYh2qYztABk2L4XKwgEZ/g3LMwI65UIAZOKOhNj7jgzAb8NN7SONdVNXSLwrXd5AItz47RpRok7dOGTRAuyDUiap5ui9ABSoLQS0eloTMGBFSGLG4VA98= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765384392; c=relaxed/simple; bh=ZwwZmSC7751h7Asg+LxflN5+ZhqM3IhctzMtpu+1Szg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=S1u62AG8dNpghWz1q33XlVdK7KrfxeKnkeh55kiLGw6hDH9jKSP7ZP4B6b1PgN8X+V2KCgPEfpCmkfF8Qsk++AKXkvaHdry3UD4pdhCJN5+0oQbVNeUA0VB2tYTelufdYoxfVM3KHHUqnrAKQOTkrb/DLntdY+9W+ppqmHiYisw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=KW8ltBPw; arc=none smtp.client-ip=90.155.92.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="KW8ltBPw" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=jGEvegA+ljBYLEwwAKmn9MuzhxUDKRBuQItjppiVKuc=; b=KW8ltBPwZMkc5kwO4GolQ1sKIS do0DAwKYixwLcUrwDDP8AJCaobnWh7hfsYU5vU809cXq02sQSuOvurbZZ3zSJS3709t6dnOQS3woS eN3pnQN6kEcSrIdH3qyfEQT3+WbUNzv2PWtsw5W2Hi2FV+78hfxtdkUPTsBFxklGN+MjSXORuiRcH nuqlmY90WlQOWg218QZl91hkEYCPC811GiePZX+GiKzZl802hvVIDV2d07G8eLFqJqpTl182opz1M ufPGqJpO08ezThOKB7mZQZJGFeknOALDq0qa4MpRTClQQ0EfizCr2IN6saXtiW2WgELfGZANyo2dw /Q3U1wSg==; Received: from 2001-1c00-8d85-5700-266e-96ff-fe07-7dcc.cable.dynamic.v6.ziggo.nl ([2001:1c00:8d85:5700:266e:96ff:fe07:7dcc] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vTMFj-0000000Daoj-08ja; Wed, 10 Dec 2025 15:37:19 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 4B8FA300566; Wed, 10 Dec 2025 17:32:35 +0100 (CET) Date: Wed, 10 Dec 2025 17:32:35 +0100 From: Peter Zijlstra To: Tim Chen Cc: Ingo Molnar , K Prateek Nayak , "Gautham R . Shenoy" , Vincent Guittot , Chen Yu , Juri Lelli , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Madadi Vineeth Reddy , Hillf Danton , Shrikanth Hegde , Jianyong Wu , Yangyu Chen , Tingyin Duan , Vern Hao , Vern Hao , Len Brown , Aubrey Li , Zhao Liu , Chen Yu , Adam Li , Aaron Lu , Tim Chen , linux-kernel@vger.kernel.org, Libo Chen Subject: Re: [PATCH v2 16/23] sched/cache: Introduce sched_cache_present to enable cache aware scheduling for multi LLCs NUMA node Message-ID: <20251210163235.GX3707891@noisy.programming.kicks-ass.net> References: <7453e3f901878608959f23dacaa36dfc0432c05b.1764801860.git.tim.c.chen@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7453e3f901878608959f23dacaa36dfc0432c05b.1764801860.git.tim.c.chen@linux.intel.com> On Wed, Dec 03, 2025 at 03:07:35PM -0800, Tim Chen wrote: > From: Chen Yu > > 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 > Suggested-by: Adam Li > Signed-off-by: Chen Yu > Signed-off-by: Tim Chen > --- > > 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?