From: Tejun Heo <tj@kernel.org>
To: quzicheng315@gmail.com
Cc: peterz@infradead.org, arighi@nvidia.com, brho@google.com,
bsegall@google.com, changwoo@igalia.com,
dietmar.eggemann@arm.com, haoluo@google.com, joshdon@google.com,
juri.lelli@redhat.co, kprateek.nayak@amd.com,
linux-kernel@vger.kernel.org, mgorman@suse.de, mingo@redhat.com,
quzicheng@huawei.com, rostedt@goodmis.org,
sched-ext@lists.linux.dev, tanghui20@huawei.com,
vincent.guittot@linaro.org, void@manifault.com,
vschneid@redhat.com, zhangqiao22@huawei.com
Subject: Re: [PATCH v3] sched/fair: Rebuild load weight when switching to fair
Date: Thu, 28 May 2026 04:27:06 -1000 [thread overview]
Message-ID: <ahhQumeje0bSBdrP@slm.duckdns.org> (raw)
In-Reply-To: <20260528131238.3879110-1-quzicheng315@gmail.com>
On Thu, May 28, 2026 at 09:12:38PM +0800, quzicheng315@gmail.com wrote:
> From: Zicheng Qu <quzicheng@huawei.com>
>
> Tasks that run outside fair may not keep p->se.load in sync with their
> current scheduling policy and static priority. sched_ext, for example,
> uses p->scx.weight as the active scheduling weight, so p->se.load can be
> stale when a task moves back to fair.
>
> The fair_sched_class expects the sched_entity load weight to be valid
> before the task is enqueued. Rebuild it from fair's switching_to hook,
> which runs after the class has been changed to fair and before enqueue,
> so both sched_ext disable and SCHED_EXT to SCHED_NORMAL transitions get
> a native fair load weight.
>
> Fixes: f0e1a0643a59 ("sched_ext: Implement BPF extensible scheduler class")
>
> Suggested-by: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Zicheng Qu <quzicheng@huawei.com>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
prev parent reply other threads:[~2026-05-28 14:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 13:52 [PATCH] sched_ext: Rebuild fair weight when disabling BPF scheduler Zicheng Qu
2026-05-26 17:20 ` Andrea Righi
2026-05-27 9:40 ` [PATCH v2] sched_ext: Rebuild fair weight on ext to fair switches quzicheng315
2026-05-27 11:26 ` Peter Zijlstra
2026-05-28 2:53 ` Zicheng Qu
2026-05-28 9:25 ` Peter Zijlstra
2026-05-28 13:12 ` [PATCH v3] sched/fair: Rebuild load weight when switching to fair quzicheng315
2026-05-28 14:27 ` Tejun Heo [this message]
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=ahhQumeje0bSBdrP@slm.duckdns.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=brho@google.com \
--cc=bsegall@google.com \
--cc=changwoo@igalia.com \
--cc=dietmar.eggemann@arm.com \
--cc=haoluo@google.com \
--cc=joshdon@google.com \
--cc=juri.lelli@redhat.co \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=quzicheng315@gmail.com \
--cc=quzicheng@huawei.com \
--cc=rostedt@goodmis.org \
--cc=sched-ext@lists.linux.dev \
--cc=tanghui20@huawei.com \
--cc=vincent.guittot@linaro.org \
--cc=void@manifault.com \
--cc=vschneid@redhat.com \
--cc=zhangqiao22@huawei.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®