From: Vincent Guittot <vincent.guittot@linaro.org>
To: Peng Huang <penghuang@google.com>
Cc: Tejun Heo <tj@kernel.org>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
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>,
David Vernet <void@manifault.com>,
Andrea Righi <arighi@nvidia.com>,
Changwoo Min <changwoo@igalia.com>,
linux-kernel@vger.kernel.org, sched-ext@lists.linux.dev,
stable@vger.kernel.org
Subject: Re: [PATCH] sched/pelt: Skip dormant cfs util_sum under scx_switched_all
Date: Tue, 24 Nov 2026 11:21:39 +0100 [thread overview]
Message-ID: <CAKfTPtANtEnDDOe-PdLVR3BU5_cm9LiWTnU6eZJveUs4Py4qog@mail.gmail.com> (raw)
In-Reply-To: <20261124004742.1248371-1-penghuang@google.com>
On Tue, 24 Nov 2026 at 01:47, Peng Huang <penghuang@google.com> wrote:
>
> Hi Tejun,
>
> On Mon, Nov 23, 2026 at 01:48:44PM -1000, Tejun Heo wrote:
> > I'm not familiar with this code, so I may be missing something, but
> > doesn't __update_blocked_fair() already do most of this? It walks
> > leaf_cfs_rq_list bottom-up, flushes cfs_rq->removed and propagates the
> > result to the parent. It just stops running once scx_switched_all() is
> > set. Maybe the helper can run the blocked load update once on each rq
> > from that loop instead of open-coding the clearing? If I'm reading it
> > right, one pass after all the tasks have switched would take care of #1.
>
> Yes, Vincent suggested the same thing, and I sent v2 earlier today doing
> that one-pass drain via __sched_balance_update_blocked_averages(rq) in
> scx_enable():
>
> https://lore.kernel.org/r/cover.1795462673.git.penghuang@google.com
>
> > As for #2, are the leftover sums big enough to matter for
> > update_idle_rq_clock_pelt()? It looks like fair can leave similar
> > leftovers behind once the avgs reach zero.
>
> You're right -- for update_idle_rq_clock_pelt(), #2 on its own is tiny
> (< divider, i.e. < 1/1024 capacity per recently-decayed group) and is
> not nearly enough to cause an issue once #1 is drained. #1 was the real
> culprit in our reproduction.
>
> I only split #2 out as patch 1/2 in v2 per Vincent's suggestion to clean
> up the util_sum != 0 residual in update_tg_cfs_*() when _avg == 0 (which
> otherwise keeps cfs_rq_is_decayed() false and leaves empty parent
> cfs_rqs on leaf_cfs_rq_list in fair). Patch 2/2 alone already resolves
> the sched_ext issue.
If patch 1/2 is not needed for scx_switched_all() case, I suggest to
skip it. When fair tasks are involved, the *_sum will decay to 0 at
during update
>
> Thanks,
> Peng
next prev parent reply other threads:[~2026-11-24 10:21 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 1:57 Peng Huang
2026-11-23 10:34 ` Vincent Guittot
2026-11-23 16:09 ` Peng Huang
2026-11-23 17:07 ` Vincent Guittot
2026-11-23 20:14 ` Peng Huang
2026-11-23 23:48 ` Tejun Heo
2026-11-24 0:47 ` Peng Huang
2026-11-24 10:21 ` Vincent Guittot [this message]
2026-11-23 20:13 ` [PATCH v2 0/2] sched_ext, sched/fair: Drain blocked fair load on scx_switched_all Peng Huang
2026-11-23 20:13 ` [PATCH v2 1/2] sched/fair: Clear residual sums on zero task-group avg propagation Peng Huang
2026-11-24 10:23 ` Vincent Guittot
2026-11-24 14:36 ` Peng Huang
2026-11-23 20:13 ` [PATCH v2 2/2] sched_ext, sched/fair: Drain blocked load on scx_switched_all Peng Huang
2026-11-24 13:35 ` Vincent Guittot
2026-11-24 15:04 ` Tejun Heo
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=CAKfTPtANtEnDDOe-PdLVR3BU5_cm9LiWTnU6eZJveUs4Py4qog@mail.gmail.com \
--to=vincent.guittot@linaro.org \
--cc=arighi@nvidia.com \
--cc=bsegall@google.com \
--cc=changwoo@igalia.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=penghuang@google.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sched-ext@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=tj@kernel.org \
--cc=void@manifault.com \
--cc=vschneid@redhat.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®