From: Andrea Righi <arighi@nvidia.com>
To: Tejun Heo <tj@kernel.org>
Cc: sched-ext@lists.linux.dev, David Vernet <void@manifault.com>,
Changwoo Min <changwoo@igalia.com>,
Emil Tsalapatis <emil@etsalapatis.com>,
David Dai <david.dai@linux.dev>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] sched_ext: Add ops.sub_child_ecaps_updated() to report a child's effective cap changes
Date: Fri, 9 Oct 2026 22:14:55 +0200 [thread overview]
Message-ID: <aslLP_r6bl6TC8u1@gpd4> (raw)
In-Reply-To: <75b599f5c3e38cc62e33c4bf370a1d84@kernel.org>
On Fri, Oct 09, 2026 at 10:04:11AM -1000, Tejun Heo wrote:
> Hello, Andrea.
>
> On Fri, Oct 09, 2026 at 01:17:15PM +0200, Andrea Righi wrote:
> > Should ops.sub_child_ecaps_updated() still be delivered to the parent when the
> > child is bypassing but the parent is not?
> >
> > For example, the shared pool may rotate away from a bypassing child. IIUC, its
> > PERF revoke takes effect at the next dispatch, but the child's bypass state
> > suppresses the parent notification too. If the child is being disabled, it never
> > leaves bypass, so the parent only gets ops.sub_detach() and cannot tell when the
> > revoke took effect.
> >
> > Could we notify the parent when the revoke takes effect, even if the child is
> > bypassing, while continuing to defer the child's own notification until it
> > leaves bypass?
>
> A child can't enter and stay in bypass on its own. It bypasses during its
> own enable, which is lifted and replayed, during its own disable, or when
> the whole hierarchy is bypassing and so is the parent. That leaves disable.
> v1 reported the revokes of a disabling child and it got nasty because the
> calling context differs from the sync path: the dispatch kfuncs needed their
> context set up outside the dispatch path, the nested sub dispatch had to be
> gated, and keeping the report clear of the PM bypass took a lock that could
> stall a suspend. The simpler contract that works is that ops.sub_detach()
> covers a disabling child. All of the child's caps are gone by the time it
> runs, so the parent restores what it delegated from there.
Ah yes, it makes sense, disable is the only case where a child remains bypassed
while the parent is active. Handling final cleanup in ops.sub_detach() is
reasonable given the different calling context.
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Thanks,
-Andrea
next prev parent reply other threads:[~2026-10-09 20:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 9:32 [PATCHSET v2 sched_ext/for-7.4] sched_ext: Add ops.sub_child_ecaps_updated() Tejun Heo
2026-10-08 9:32 ` [PATCH 1/2] sched_ext: Add ops.sub_child_ecaps_updated() to report a child's effective cap changes Tejun Heo
2026-10-09 11:17 ` Andrea Righi
2026-10-09 20:04 ` Tejun Heo
2026-10-09 20:14 ` Andrea Righi [this message]
2026-10-08 9:32 ` [PATCH 2/2] sched_ext: scx_qmap: Reset a child's cpuperf targets once its PERF revoke takes effect Tejun Heo
2026-10-09 11:18 ` Andrea Righi
2026-10-09 20:04 ` Tejun Heo
2026-10-09 20:48 ` [PATCH v3 " Tejun Heo
2026-10-09 21:38 ` Andrea Righi
2026-10-09 21:44 ` [PATCHSET v2 sched_ext/for-7.4] sched_ext: Add ops.sub_child_ecaps_updated() Tejun Heo
-- strict thread matches above, loose matches on Subject: below --
2026-10-08 0:03 [PATCHSET " Tejun Heo
2026-10-08 0:03 ` [PATCH 1/2] sched_ext: Add ops.sub_child_ecaps_updated() to report a child's effective cap changes 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=aslLP_r6bl6TC8u1@gpd4 \
--to=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=david.dai@linux.dev \
--cc=emil@etsalapatis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
--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
all inboxes | Powered by JetHome®