From: Andrea Righi <arighi@nvidia.com>
To: Zicheng Qu <quzicheng@huawei.com>
Cc: sashiko-bot@kernel.org, sashiko-reviews@lists.linux.dev,
linux-kernel@vger.kernel.org, sched-ext@lists.linux.dev,
peterz@infradead.org, 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,
mgorman@suse.de, mingo@redhat.com, rostedt@goodmis.org,
tj@kernel.org, vincent.guittot@linaro.org, void@manifault.com,
vschneid@redhat.com, tanghui20@huawei.com,
zhangqiao22@huawei.com, quzicheng315@gmail.com
Subject: Re: [PATCH v4 0/2] sched/fair: Fix fair load state when switching to fair
Date: Wed, 24 Jun 2026 13:57:27 +0200 [thread overview]
Message-ID: <ajvGJ4Uui745fbBA@gpd4> (raw)
In-Reply-To: <20260624091648.271891-1-quzicheng@huawei.com>
Hi Zicheng,
On Wed, Jun 24, 2026 at 09:16:46AM +0000, Zicheng Qu wrote:
> Tasks outside fair may leave fair's sched_entity load state stale when
> they switch back to fair. Patch 1 rebuilds p->se.load from fair's
> switching_to hook, as in v3. Patch 2 keeps se->avg.load_avg in sync
> with the rebuilt load weight before the entity is attached back to fair.
Looks good to me.
Acked-by: Andrea Righi <arighi@nvidia.com>
Thanks,
-Andrea
>
> Changes in v4:
> - Add Tejun's Acked-by to patch 1.
> - Split the PELT load_avg synchronization into patch 2.
>
> Changes in v3:
> - Move the rebuild into fair's switching_to hook, as suggested by Peter.
> This lets fair prepare its own state before enqueue and avoids adding a
> sched_ext/fair-specific fixup to the generic sched_change_end() path.
>
> Changes in v2:
> - Move the fix from scx_root_disable() to the class switch path so it also
> covers partial-mode SCHED_EXT to SCHED_NORMAL transitions through
> sched_setscheduler(). Andrea identified this missing case in the v1
> discussion.
>
> Zicheng Qu (2):
> sched/fair: Rebuild load weight when switching to fair
> sched/fair: Keep load_avg in sync after reweighting
>
> kernel/sched/fair.c | 24 +++++++++++++++++++-----
> 1 file changed, 19 insertions(+), 5 deletions(-)
>
> --
> 2.53.0
prev parent reply other threads:[~2026-06-24 11:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260530050609.0D0FB1F00893@smtp.kernel.org>
2026-06-24 9:16 ` [PATCH v4 0/2] sched/fair: Fix fair load state when switching to fair Zicheng Qu
2026-06-24 9:16 ` [PATCH v4 1/2] sched/fair: Rebuild load weight " Zicheng Qu
2026-06-24 9:16 ` [PATCH v4 2/2] sched/fair: Keep load_avg in sync after reweighting Zicheng Qu
2026-06-24 11:57 ` Andrea Righi [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=ajvGJ4Uui745fbBA@gpd4 \
--to=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=sashiko-bot@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sched-ext@lists.linux.dev \
--cc=tanghui20@huawei.com \
--cc=tj@kernel.org \
--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