mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCHSET sched_ext/for-7.3-fixes] sched_ext: Fix bypass propagation and the bypass dispatch claim for overlapping bypasses
@ 2026-10-11 21:40 Tejun Heo
  2026-10-11 21:40 ` [PATCH 1/2] sched_ext: Propagate every bypass depth change to the descendants Tejun Heo
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Tejun Heo @ 2026-10-11 21:40 UTC (permalink / raw)
  To: sched-ext
  Cc: David Vernet, Andrea Righi, Changwoo Min, Emil Tsalapatis,
	David Dai, linux-kernel, Tejun Heo

Hello,

scx_bypass() propagates a bypass to the descendants, and claims bypass
dispatch on the host, only when the scheduler's own depth crosses zero. A
sub-scheduler's own bypass that overlaps an ancestor's then misses both: its
descendants drop out of bypass early, and its claim is leaked or never
taken. A PM suspend over a sub-scheduler's enable trips the WARN_ON_ONCE()
in enable_bypass_dsp() on the next bypass, and one over a disable leaves its
tasks on the parent's bypass DSQs with nobody consuming them.

Patch 1 propagates every depth change so that a descendant's depth is the
sum of its own and its ancestors' bypasses. Patch 2 claims and releases
bypass dispatch for the propagated descendants too.

Verified with a debug patch holding a sub-scheduler's enable bypass open
across PM suspend cycles: every suspend landed inside it, the unfixed kernel
trips the WARN on the following disable and the fixed one does not, with the
sub-scheduler's tasks running after each resume. The claim protocol across
the PM notifier, sub-scheduler enable and disable and root disable was
model-checked with TLC, including the sequences fixed here.

Based on sched_ext/for-7.3-fixes (069403dff337).

This patchset contains the following 2 patches.

 0001 sched_ext: Propagate every bypass depth change to the descendants
 0002 sched_ext: Fix the bypass dispatch claim for schedulers bypassed by an ancestor

The patchset is also available in the following git branch:

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git bypass-claim-fixes

diffstat follows. Thanks.

 kernel/sched/ext/ext.c | 54 ++++++++++++++++++++++++++++++--------------------
 1 file changed, 33 insertions(+), 21 deletions(-)

--
tejun

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

end of thread, other threads:[~2026-10-12 18:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-11 21:40 [PATCHSET sched_ext/for-7.3-fixes] sched_ext: Fix bypass propagation and the bypass dispatch claim for overlapping bypasses Tejun Heo
2026-10-11 21:40 ` [PATCH 1/2] sched_ext: Propagate every bypass depth change to the descendants Tejun Heo
2026-10-11 21:40 ` [PATCH 2/2] sched_ext: Fix the bypass dispatch claim for schedulers bypassed by an ancestor Tejun Heo
2026-10-12 18:11 ` [PATCHSET sched_ext/for-7.3-fixes] sched_ext: Fix bypass propagation and the bypass dispatch claim for overlapping bypasses Andrea Righi
2026-10-12 18:40 ` 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®