[PATCH 0/3] sched/fair: Update decision matrix and rename pinned-task group state

From: Jemmy Wong

Date: Mon Sep 28 2026 - 00:20:54 EST


Patch 1 brings the group-type decision matrix above
sched_balance_find_src_group() up to date. The matrix was introduced
by Vincent Guittot in commit 0b0695f2b34a ("sched/fair: Rework
load_balance()"). When commit fee1759e4f04 ("sched/fair: Determine
active load balance for SMT sched groups") added group_smt_balance
and commit f38cc2f0d8a3 ("sched/cache: Prioritize tasks preferring
destination LLC during balancing") added group_llc_balance, neither
author updated the matrix table.

Both are only tagged on non-local groups, so their columns are N/A.
As busiest, both go through the nr_idle checks rather than an
unconditional force, and both are balanced against a busier local
group.

Patches 2-3 rename the state that tracks load balancing failures caused
by cpus_ptr-pinned tasks. The names come from the original group_imb
heuristic, which did detect per-CPU load skew; commit 6263322c5e8f
("sched/fair: Rewrite group_imb trigger") turned it into an affinity
failure flag but kept the name. Today group_imbalanced is not what
group_classify() returns for skewed load, calculate_imbalance()
computes no imbalance for it, and sgc->imbalance collides with
env->imbalance and imbalance_pct. They become group_pinned_task and
sgc->pinned_task, matching the LBF_*_PINNED flags that set them.

Patch 1 does not depend on patches 2-3 and can be applied on its own.

No functional change.

Jemmy Wong (3):
sched/fair: Add smt_balance and llc_balance to the decision matrix
sched/fair: Rename group_imbalanced to group_pinned_task
sched/fair: Rename sgc->imbalance to sgc->pinned_task

kernel/sched/fair.c | 66 +++++++++++++++++++++++---------------------
kernel/sched/sched.h | 6 +++-
2 files changed, 39 insertions(+), 33 deletions(-)

--
2.54.0 (Apple Git-157)