From: Tejun Heo <tj@kernel.org>
To: Peng Huang <penghuang@google.com>
Cc: void@manifault.com, arighi@nvidia.com, changwoo@igalia.com,
sched-ext@lists.linux.dev, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
vschneid@redhat.com, kprateek.nayak@amd.com, haoluo@google.com,
brho@google.com, joshdon@google.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sched_ext: Update other_load_avgs on set_next_task_scx and idle entry
Date: Sun, 22 Nov 2026 23:47:04 -1000 [thread overview]
Message-ID: <06baa96f105bbe10e6283e908f1240cb@kernel.org> (raw)
In-Reply-To: <20261122062121.4172437-1-penghuang@google.com>
Hello, Peng.
On Sat, Nov 21, 2026 at 10:21:21PM -0800, Peng Huang wrote:
> If SCX_RQ_CAN_STOP_TICK stays unchanged (e.g., remaining set across an
> idle or RT interval on tickless CPUs, or remaining clear on finite-slice
> switches before a tick fires), or when an SCX task goes idle after an
> RT/DL interval without an intervening tick, stale RT/DL PELT values
> can remain elevated when consumers such as effective_cpu_util() or
> update_idle_rq_clock_pelt() read them.
I think this overstates the staleness. While the tick is running,
scx_tick() updates them on every tick, so they're at most a tick old,
at idle entry too. That's already a lot more often than fair, which
updates them at load balancing intervals.
> Refresh update_other_load_avgs() once at the entry of set_next_task_scx()
> (before SNT_REPICK early return and before ops.running() for SNT_PICK /
> SNT_NORMAL), and in put_prev_task_scx() when transitioning to the idle
> class.
update_other_load_avgs() isn't necessarily cheap and I don't think we
want to call it from scheduling hot paths. If anything, sched_ext is
already updating them too often and we should pace it down.
The actual hole is CPUs with the tick stopped, where nothing updates
them, and this patch doesn't address that.
Also, how was this tested? Is this from reading the code, or was the
effect observed or tested in some way?
Thanks.
--
tejun
prev parent reply other threads:[~2026-11-23 9:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-22 3:33 [PATCH] sched_ext: Update other_load_avgs on set_next_task_scx Peng Huang
2026-11-22 6:21 ` [PATCH v2] sched_ext: Update other_load_avgs on set_next_task_scx and idle entry Peng Huang
2026-11-23 9:47 ` 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=06baa96f105bbe10e6283e908f1240cb@kernel.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.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=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®