mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCHSET sched_ext/for-7.4] sched_ext: Report a sub-scheduler's attach-time ecaps before lifting its enable bypass
@ 2026-10-09  9:43 Tejun Heo
  2026-10-09  9:43 ` [PATCH 1/2] sched_ext: Factor out sync_pcpu_ecaps() Tejun Heo
  2026-10-09  9:43 ` [PATCH 2/2] sched_ext: Report a sub-scheduler's attach-time ecaps before lifting its enable bypass Tejun Heo
  0 siblings, 2 replies; 3+ messages in thread
From: Tejun Heo @ 2026-10-09  9:43 UTC (permalink / raw)
  To: sched-ext
  Cc: David Vernet, Andrea Righi, Changwoo Min, Emil Tsalapatis,
	David Dai, linux-kernel, Tejun Heo

Hello,

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.

Patch 1 factors the per-cpu ecaps sync out of the dispatch-side drain so
that it can run from elsewhere. Patch 2 has the enable path report the
attach-time grants on every cpu while the sub-scheduler is still bypassing,
so that it has its complete cid view when the first task arrives.

Verified with a sub-scheduler attaching under a parent with tasks already
queued, with cids revoked and granted back while attached, and across detach
and re-attach: no task is rescued or stalled at attach, and the root
scheduler is unaffected. The ordering between the enable path, the per-cpu
syncs and the parent's grants was model-checked with TLC.

Based on sched_ext/for-7.4 (3d7c2f550eef).

This patchset contains the following 2 patches.

 0001 sched_ext: Factor out sync_pcpu_ecaps()
 0002 sched_ext: Report a sub-scheduler's attach-time ecaps before lifting its enable bypass

The patchset is also available in the following git branch:

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git sub-attach-ecaps

diffstat follows. Thanks.

 kernel/sched/ext/sub.c | 194 ++++++++++++++++++++++++++++++++++---------------
 1 file changed, 134 insertions(+), 60 deletions(-)

--
tejun

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-09  9:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-09  9:43 [PATCHSET sched_ext/for-7.4] sched_ext: Report a sub-scheduler's attach-time ecaps before lifting its enable bypass Tejun Heo
2026-10-09  9:43 ` [PATCH 1/2] sched_ext: Factor out sync_pcpu_ecaps() Tejun Heo
2026-10-09  9:43 ` [PATCH 2/2] sched_ext: Report a sub-scheduler's attach-time ecaps before lifting its enable bypass Tejun Heo

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®