[RFC PATCH v2 14/23] sched/cache: Drop prefer_sibling restriction for llc_balance

From: Jianyong Wu

Date: Thu Aug 27 2026 - 08:41:06 EST


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 <wujianyong@xxxxxxxx>
---
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 == group_has_spare &&
- (busiest->group_type == group_llc_balance ||
- sibling_imbalance(env, &sds, busiest, local) > 1))
+ if (local->group_type == group_has_spare &&
+ ((busiest->group_type == group_llc_balance) || (sds.prefer_sibling &&
+ sibling_imbalance(env, &sds, busiest, local) > 1)))
goto force_balance;

if (busiest->group_type != group_overloaded) {
--
2.34.1