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: [PATCHSET v3 sched_ext/for-7.4] sched_ext: Report a sub-scheduler's ecaps on attach, detach and cpu hotplug
Date: Sun, 18 Oct 2026 11:19:46 +0200 [thread overview]
Message-ID: <atSPMmtaEVJCfZxP@gpd4> (raw)
In-Reply-To: <20261018015952.1499528-1-tj@kernel.org>
Hi Tejun,
On Sat, Oct 17, 2026 at 03:59:46PM -1000, Tejun Heo wrote:
> Hello,
>
> v3 (resched from irq work):
> - Reschedule the cpu for its queued ecaps syncs from hard irq work on that
> cpu instead of a kick. dispatch_one() processes the syncs only at its
> start, and a kick that lands while the pick has the rq lock dropped is
> cleared with the pick (#3, #5, sashiko).
> - Fix the SCX_RQ_ONLINE comments (#4) and why no report mark is pending at a
> suspend down (#6), and update comments and descriptions.
>
> v2 (detach and cpu hotplug):
> - Report the caps on detach as well as attach, and deliver regardless of
> bypass, which drops the replay at unbypass (#3).
> - Drop the sync_pcpu_ecaps() factoring. Add the cid_pshard() factoring and
> free a sub-scheduler a grace period after discarding its syncs (#1, #2).
> - Deliver only while the root has the cpu online, report the loss when a
> cpu goes offline, and leave suspend and hibernation out (#4-#6).
>
> v2: https://lore.kernel.org/r/20261017164556.4136807-1-tj@kernel.org
> v1: https://lore.kernel.org/r/20261009094356.2852794-1-tj@kernel.org
>
> A sub-scheduler learns which cids it holds through ops.sub_ecaps_updated(),
> but the grants its parent makes when it attaches are reported only after its
> enable bypass is lifted, which is also when its tasks are handed to it. So
> it gets its first ops.enqueue() calls before it has been notified of a
> single cid and has to hold the tasks somewhere until the grants arrive.
>
> The losses aren't reported either. The caps go away on detach and when a cpu
> goes offline without a delivery to the sub-scheduler or its parent. The
> reseed of a cpu coming back can also run their ops before the root's
> ops.cpu_online().
>
> With this patchset, a sub-scheduler's ecaps change only with the deliveries
> that report them. The attach-time caps are reported before bypass lifts, the
> loss on detach before any task goes back to the parent, and a cpu's loss and
> regain around the root's ops.cpu_offline() and ops.cpu_online(). Suspend
> and hibernation are left out: a cpu they take down keeps the caps last
> delivered, and the resume reports only the net change.
>
> Verified with sub-schedulers attaching and detaching with tasks queued and
> caps granted and revoked, through cpu hotplug with the races widened by
> debug patches and grants flooding a cpu as it goes down, on PREEMPT_RT as
> well, and across suspend. The protocol between the reports, the per-cpu
> syncs, cpu hotplug, suspend and the free path was model checked with TLC
> for small cpu counts.
For the whole series:
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Thanks,
-Andrea
prev parent reply other threads:[~2026-10-18 9:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-18 1:59 Tejun Heo
2026-10-18 1:59 ` [PATCH 1/6] sched_ext: Factor out cid_pshard() Tejun Heo
2026-10-18 1:59 ` [PATCH 2/6] sched_ext: Free a sub-scheduler a grace period after discarding its ecaps syncs Tejun Heo
2026-10-18 6:56 ` Andrea Righi
2026-10-18 8:16 ` Tejun Heo
2026-10-18 9:17 ` Andrea Righi
2026-10-18 1:59 ` [PATCH 3/6] sched_ext: Report a sub-scheduler's ecaps on attach and detach Tejun Heo
2026-10-18 1:59 ` [PATCH 4/6] sched_ext: Deliver ecaps only while the root has the cpu online Tejun Heo
2026-10-18 1:59 ` [PATCH 5/6] sched_ext: Report the ecaps loss when a cpu goes offline Tejun Heo
2026-10-18 6:49 ` Andrea Righi
2026-10-18 8:15 ` Tejun Heo
2026-10-18 7:01 ` Andrea Righi
2026-10-18 8:16 ` Tejun Heo
2026-10-18 9:18 ` Andrea Righi
2026-10-18 8:22 ` [PATCH v3 " Tejun Heo
2026-10-18 1:59 ` [PATCH 6/6] sched_ext: Leave suspend and hibernation out of the ecaps reports Tejun Heo
2026-10-18 9:19 ` Andrea Righi [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=atSPMmtaEVJCfZxP@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®