From: Peng Huang <penghuang@google.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Peng Huang <penghuang@google.com>, 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>,
Tejun Heo <tj@kernel.org>, 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: Mon, 23 Nov 2026 12:14:20 -0800 [thread overview]
Message-ID: <20261123201420.3970775-1-penghuang@google.com> (raw)
In-Reply-To: <CAKfTPtD17e-veL1QgrhO6i4nsKyA3QfOEm8jNinJ_zf+vc8RDw@mail.gmail.com>
On Mon, 23 Nov 2026 at 18:07, Vincent Guittot
<vincent.guittot@linaro.org> wrote:
>
> Yes this seems a better solution but It would be good to reuse
> __update_blocked_fair() which already does the work for pelt signal.
> Regarding your issue with util_avg == 0 whereas we still have a
> util_sum != 0, we can use delta_sum = gcfs_rq->avg.util_sum -
> se->avg.util_sum; in update_tg_cfs_util() instead. When util_avg == 0
> we will be sure to clear util_sum too
Thanks for the suggestions, Vincent!
One small detail in update_tg_cfs_util(): under CONFIG_CFS_BANDWIDTH,
gcfs_rq and its parent cfs_rq can have different period_contrib, so for
non-zero util_avg we still want new_sum = se->avg.util_avg * divider
using the parent cfs_rq's divider. Keeping that calculation while only
skipping the update when gcfs_rq->avg.util_avg != 0 or
se->avg.util_sum == 0 preserves period_contrib alignment and clears
residual _sum whenever util_avg reaches 0 (and similarly in
update_tg_cfs_{runnable,load}()).
I have sent out a 2-patch v2 series implementing this along with reusing
__sched_balance_update_blocked_averages() in scx_enable():
[PATCH v2 0/2] sched_ext, sched/fair: Drain blocked fair load on scx_switched_all
Thanks,
Peng
next prev parent reply other threads:[~2026-11-23 20:14 UTC|newest]
Thread overview: 8+ 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 [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-23 20:13 ` [PATCH v2 2/2] sched_ext, sched/fair: Drain blocked load on scx_switched_all Peng Huang
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=20261123201420.3970775-1-penghuang@google.com \
--to=penghuang@google.com \
--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=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sched-ext@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=tj@kernel.org \
--cc=vincent.guittot@linaro.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®