From: Tejun Heo <tj@kernel.org>
To: Kuba Piecuch <jpiecuch@google.com>
Cc: David Vernet <void@manifault.com>,
Andrea Righi <arighi@nvidia.com>,
Changwoo Min <changwoo@igalia.com>,
sched-ext@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCHSET sched_ext/for-7.4-fixes] sched_ext: sub: Don't run ops.sub_caps_updated() in an SCX op context
Date: Fri, 27 Nov 2026 05:43:11 -1000 [thread overview]
Message-ID: <8e4043f995e96c0d4642287bc5009000@kernel.org> (raw)
In-Reply-To: <20261125153353.1364467-1-jpiecuch@google.com>
Hello, Kuba.
On Wed, Nov 25, 2026 at 03:34:19PM +0000, Kuba Piecuch wrote:
> scx_bpf_sub_grant() and scx_bpf_sub_revoke() are in scx_kfunc_ids_any, so
> a parent scheduler can call them from any op. Before returning, they
> deliver ops.sub_caps_updated() to the affected children synchronously:
The synchronous delivery is intentional. Once it's deferred, it becomes
unclear what happens when there are competing updates.
ops.sub_caps_updated() is there only so that a sub-sched can propagate
grants and revokes to its own children. It isn't the place for any other
operation. ops.sub_ecaps_updated() is the one that reports a change once
it's in effect on the cpu and it runs with the rq locked, so anything
that acts on the caps, e.g. setting cpuperf, belongs there.
All the listed failure modes are self-inflicted, e.g. a sub-sched calling
scx_bpf_cidperf_set() from ops.sub_caps_updated() or a parent granting
from ops.dump*(), and none of them is critical. Isn't this more of a
documentation problem than anything else?
Thanks.
--
tejun
prev parent reply other threads:[~2026-11-27 15:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 15:34 [RFC PATCHSET sched_ext/for-7.4-fixes] sched_ext: sub: Don't run ops.sub_caps_updated() in an SCX op context Kuba Piecuch
2026-11-25 15:34 ` [RFC PATCH 1/2] sched_ext: sub: Defer ops.sub_caps_updated() out of SCX op contexts Kuba Piecuch
2026-11-25 15:34 ` [RFC PATCH 2/2] selftests/sched_ext: Test that ops.sub_caps_updated() runs unlocked Kuba Piecuch
2026-11-27 15:43 ` 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=8e4043f995e96c0d4642287bc5009000@kernel.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=jpiecuch@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--cc=void@manifault.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