mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] sched/cache: Ignore non-fair current in alb_break_llc()
@ 2026-10-20 16:17 Kayra Cizmeci
  2026-10-20 18:14 ` Tim Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Kayra Cizmeci @ 2026-10-20 16:17 UTC (permalink / raw)
  To: peterz, mingo, juri.lelli, vincent.guittot, Dietmar Eggemann,
	Steven Rostedt, Ben Segall, Mel Gorman, Valentin Schneider,
	K Prateek Nayak, Tim Chen, Chen Yu, Ricardo Neri
  Cc: linux-kernel, Kayra Cizmeci

Commit d6b9afab44e23 ("sched/cache: Fix
checking active load balance by only considering the CFS task")

Stopped using task_util() for non-fair tasks. Since the values
of non-fair tasks can be stale.

__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") uses cur 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>
---
 kernel/sched/fair.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 0feec172fd37..6347ae4cb419 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -11016,7 +11016,9 @@ 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)
+		if (cur && cur->sched_class != &fair_sched_class)
+			cur = NULL;
+		if (cur)
 			util = task_util(cur);
 
 		if (task_misfits_asym_cpu(env, cur) ||
-- 
2.53.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-20 18:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-20 16:17 [PATCH] sched/cache: Ignore non-fair current in alb_break_llc() Kayra Cizmeci
2026-10-20 18:14 ` Tim Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®