diff options
| author | Kayra Cizmeci <kayracizmeci@gmail.com> | 2026-10-20 21:54:01 +0300 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2026-11-06 10:10:52 +0100 |
| commit | 006991aa89974378ee579416dba87adc22cd60fd (patch) | |
| tree | be01ff0666a019fcdcb24724e662aaf7bdbc4b6f /kernel | |
| parent | 5ebdfe12ab96368d0339593129d4ce0bc2bd06f5 (diff) | |
sched/cache: Ignore non-fair current in alb_break_llc()
Commit d6b9afab44e23 ("sched/cache: Fix
checking active load balance by only considering the CFS task")
stopped using task_util() for non-fair cur.
__active_load_balance_cpu_stop() calls detach_one_task(), that only looks
to cfs_tasks list. So if the rq->curr is not fair, doing a decision
according to it is wrong, since we only migrate tasks that is fair.
Commit f0d243a96f26 ("sched/fair: Avoid creating misfits during
cache-aware balancing") passes cur to task_misfits_asym_cpu()
without checking if the cur is in fair class or not. Fix this.
Fixes: f0d243a96f26 ("sched/fair: Avoid creating misfits during cache-aware balancing")
Signed-off-by: Kayra Cizmeci <kayracizmeci@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Tim Chen <tim.c.chen@linux.intel.com>
Link: https://patch.msgid.link/20261020185402.57017-1-kayracizmeci@gmail.com
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/fair.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index ad414539bc4f..79f6b3a4fd7f 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -11029,7 +11029,14 @@ alb_break_llc(struct lb_env *env) return true; cur = rcu_dereference_all(env->src_rq->curr); - if (cur && cur->sched_class == &fair_sched_class) + /* + * Active balance only detaches CFS tasks, so a non-fair + * curr is never migrated. Ignore it and avoid using its + * state util in the misfit and LLC checks. + */ + if (cur && cur->sched_class != &fair_sched_class) + cur = NULL; + if (cur) util = task_util(cur); if (task_misfits_asym_cpu(env, cur) || |
