From: Kayra Cizmeci <kayracizmeci@gmail.com>
To: peterz@infradead.org, mingo@redhat.com, juri.lelli@redhat.com,
vincent.guittot@linaro.org,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
K Prateek Nayak <kprateek.nayak@amd.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
Chen Yu <yu.c.chen@intel.com>,
Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: linux-kernel@vger.kernel.org, Kayra Cizmeci <kayracizmeci@gmail.com>
Subject: [PATCH] sched/cache: Ignore non-fair current in alb_break_llc()
Date: Tue, 20 Oct 2026 19:17:55 +0300 [thread overview]
Message-ID: <20261020161755.55690-1-kayracizmeci@gmail.com> (raw)
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
next reply other threads:[~2026-10-20 16:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-20 16:17 Kayra Cizmeci [this message]
2026-10-20 18:14 ` Tim Chen
2026-10-20 19:56 ` Tim Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261020161755.55690-1-kayracizmeci@gmail.com \
--to=kayracizmeci@gmail.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=ricardo.neri-calderon@linux.intel.com \
--cc=rostedt@goodmis.org \
--cc=tim.c.chen@linux.intel.com \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®