Re: [PATCHSET sched_ext/for-7.3-fixes] sched_ext: Fix bypass propagation and the bypass dispatch claim for overlapping bypasses
From: Andrea Righi
Date: Mon Oct 12 2026 - 14:39:18 EST
On Sun, Oct 11, 2026 at 11:40:26AM -1000, Tejun Heo wrote:
> 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.
Looks good to me, for the entire patch series:
Reviewed-by: Andrea Righi <arighi@xxxxxxxxxx>
Thanks,
-Andrea
>
> 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