From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 B4DA92D877E for ; Wed, 10 Dec 2025 16:53:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765385608; cv=none; b=ZrQQbRcyV8dSEaNLqnh8AldGW0WdMGOI8nanhw2zVF2uot8SrNhghce3R5DB3dzeY+vyEKThZaXcRcm9kPiNePrX6HAhG334qhYJeb32CxzgR8qgIlcg+R4RMayZ6KunyMO/Vzkczn8hSJ/sZwlnTTE92Nu6mV3mrQXQF5maMTE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765385608; c=relaxed/simple; bh=YbybQHM8caIjC9CnsfNqkgetridkJF9orqj3VUaBtE8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OlfgkFNQ+QcE7gDa/w7jI4cTWDLJj3+CDkBCOctcl9AnLzPj6FfwYGy2vOinTIsXmIIrP7So7f1ienQIwIHxQaxvAORDc/Dj/J7nVzhLuX5DsaRT/6SF703OXg8xBq2cvXHpGS67lNLaLb0RZDR/kjCpMlx3thjEwuwvbj6YJfs= 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=FQ+ZFGbL; arc=none smtp.client-ip=90.155.50.34 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="FQ+ZFGbL" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=eidOH9bAcSHAx81lC6Uexn3CNkiEIugKVEGhz13+F3Y=; b=FQ+ZFGbL/weOZE/ntYkH9LtxRV NWLb1JS7RrP9NS7JmEKqldPQ/QISPaPugz2uRBmr5EKPNpRP9yxN1B4LtfHOB4e3hpeKmuPln1CfM xhjlCtnWc5N61DZoJ5F22uCby3qAOdSg7Tvth3dUsiKPG4FYZ4Jvt7ZDeDuwy+9IuATuLrDuL3soY 8XHcAYD/94lUwNkl7rkU/cWIWhih/spUmHSYGOogYMY+AZ3IB9fJvvdOJjiHM7VMqrUJ5dvfzlElP +Fq9+hSlsEw90Q314HpCPnX0vC68Gk4oB4QEFGiFH+F4RH2OyOf3TqS3cT69YDigUTQPWaJ7zuJM9 52n7xbSQ==; Received: from 77-249-17-252.cable.dynamic.v4.ziggo.nl ([77.249.17.252] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98.2 #2 (Red Hat Linux)) id 1vTNQv-0000000D6T7-454T; Wed, 10 Dec 2025 16:52:58 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 1000) id 8B301300566; Wed, 10 Dec 2025 17:52:57 +0100 (CET) Date: Wed, 10 Dec 2025 17:52:57 +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: <20251210165257.GB3708021@noisy.programming.kicks-ass.net> References: <7453e3f901878608959f23dacaa36dfc0432c05b.1764801860.git.tim.c.chen@linux.intel.com> <20251210163235.GX3707891@noisy.programming.kicks-ass.net> 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: <20251210163235.GX3707891@noisy.programming.kicks-ass.net> 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 > > > > 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? Also, patch doesn't use sched_cache_present at all, so perhaps just drop it on the floor entirely?