From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailgw1.hygon.cn (unknown [101.204.27.37]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 855BD47142E for ; Tue, 1 Sep 2026 13:25:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=101.204.27.37 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788269146; cv=none; b=rkufIfqpCtccFSQ43ltnkIiU9Om/ruJS8uDJ5QSAxiypdWfEhU1v40GRqjyu6JYvrTP83fEh4gJXyJXdotpltP62IGJQdLxDVC0G70ptXPsL72/K82XOeQF7C/JSTrWsrhqXWk6rZvbkiuaZWjhDODuCxrt62o8HVqZh7XOak40= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788269146; c=relaxed/simple; bh=OSzpi44JqB5H4bqRSNRKk48DHmuO9XtaFtj5iBW1zCc=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=qZRtzv6T259hWmQUtRl8iVYC4i5BN5pSG2RNE0LFNojHHWCVdfO4B5P5LGzjgCkCZsvqtu39GHkv3ePadcK8saWD9SHV+h5FvF7KGgLzOSGuzcKzG+lzAQlPt6s9WYwQT93iYLDkvsuGlbTR3agYjlym/lZ8YvPDC0DC/J6K/Hs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=hygon.cn; spf=pass smtp.mailfrom=hygon.cn; arc=none smtp.client-ip=101.204.27.37 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=hygon.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hygon.cn Received: from maildlp1.hygon.cn (unknown [127.0.0.1]) by mailgw1.hygon.cn (Postfix) with ESMTP id 4hZ66q65M4z1PpLT; Tue, 1 Sep 2026 21:25:23 +0800 (CST) Received: from maildlp1.hygon.cn (unknown [172.23.18.60]) by mailgw1.hygon.cn (Postfix) with ESMTP id 4hZ66p2cBZz1PGCm; Tue, 1 Sep 2026 21:25:22 +0800 (CST) Received: from cncheex06.Hygon.cn (unknown [172.23.18.116]) by maildlp1.hygon.cn (Postfix) with ESMTPS id CFD2FB357; Tue, 1 Sep 2026 21:25:17 +0800 (CST) Received: from cncheex04.Hygon.cn (172.23.18.114) by cncheex06.Hygon.cn (172.23.18.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.36; Tue, 1 Sep 2026 21:25:23 +0800 Received: from cncheex04.Hygon.cn ([fe80::1b6f:6c58:58a4:430d]) by cncheex04.Hygon.cn ([fe80::1b6f:6c58:58a4:430d%10]) with mapi id 15.02.1544.036; Tue, 1 Sep 2026 21:25:23 +0800 From: Jianyong Wu To: Peter Zijlstra CC: Ingo Molnar , Juri Lelli , Vincent Guittot , Chen Yu , Tim Chen , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , K Prateek Nayak , "Shrikanth Hegde" , Phil Auld , Andrew Morton , David Hildenbrand , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "jianyong.wu@outlook.com" , Yuan Zhong , Huangsj , Fengyu Wang , Zhiwei Ying , "justin.he@arm.com" Subject: RE: [RFC PATCH v2 14/23] sched/cache: Drop prefer_sibling restriction for llc_balance Thread-Topic: [RFC PATCH v2 14/23] sched/cache: Drop prefer_sibling restriction for llc_balance Thread-Index: AQHdNiBKk4QhTa7ViUqzXSOXSWPySra5Bx6AgACzrPA= Date: Tue, 1 Sep 2026 13:25:22 +0000 Message-ID: References: <20260827122816.756234-1-wujianyong@hygon.cn> <20260827122816.756234-15-wujianyong@hygon.cn> <20260901102917.GH776954@noisy.programming.kicks-ass.net> In-Reply-To: <20260901102917.GH776954@noisy.programming.kicks-ass.net> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Hi Peter, > -----Original Message----- > From: Peter Zijlstra > Sent: Tuesday, September 1, 2026 6:29 PM > To: Jianyong Wu > Cc: Ingo Molnar ; Juri Lelli ; > Vincent Guittot ; Chen Yu > ; Tim Chen ; Dietmar > Eggemann ; Steven Rostedt > ; Ben Segall ; Mel Gorman > ; Valentin Schneider ; K > Prateek Nayak ; Shrikanth Hegde > ; Phil Auld ; Andrew > Morton ; David Hildenbrand > ; linux-kernel@vger.kernel.org; linux-mm@kvack.org; > jianyong.wu@outlook.com; Yuan Zhong ; Huangsj > ; Fengyu Wang ; Zhiwei Ying > ; justin.he@arm.com > Subject: Re: [RFC PATCH v2 14/23] sched/cache: Drop prefer_sibling > restriction for llc_balance >=20 > On Thu, Aug 27, 2026 at 08:28:07PM +0800, Jianyong Wu wrote: > > group_llc_balance performs balancing across LLC and NUMA domains. > > The prefer_sibling constraint unnecessarily limits its scope, so remove > > this requirement entirely from the branch condition. > > > > Signed-off-by: Jianyong Wu > > --- > > kernel/sched/fair.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > > index 584297528a9e..5c35a43e5e38 100644 > > --- a/kernel/sched/fair.c > > +++ b/kernel/sched/fair.c > > @@ -13274,9 +13274,9 @@ static struct sched_group > *sched_balance_find_src_group(struct lb_env *env) > > * Try to move all excess tasks to a sibling domain of the busiest > > * group's child domain. > > */ > > - if (sds.prefer_sibling && local->group_type =3D=3D group_has_spare && > > - (busiest->group_type =3D=3D group_llc_balance || > > - sibling_imbalance(env, &sds, busiest, local) > 1)) > > + if (local->group_type =3D=3D group_has_spare && > > + ((busiest->group_type =3D=3D group_llc_balance) || > (sds.prefer_sibling && > > + sibling_imbalance(env, &sds, busiest, local) > 1))) > > goto force_balance; >=20 > Not sure about blanked disable. Maybe only disable when cache aware > scheduling is present and enabled? The prefer_sibling bypass is already limited to cache aware scheduling. group_llc_balance can only be selected when llc_balance() returns true, and llc_balance() immediately return false when sched aware scheduling is not active. When CONFIG_SCHED_CACHE is disabled, the corresponding stub also cannot produce group_llc_balance. Therefore, the changed branch cannot bypass prefer_sibling when cache aware scheduling is absent or disabled. Thanks Jianyong