Re: [PATCH v2 00/16] sched/deadline: first bandwidth accounting fixes and selftests
From: Juri Lelli
Date: Thu Nov 19 2026 - 05:20:55 EST
Hello,
On 18/11/26 16:24, Mathieu Desnoyers wrote:
> Hi Ingo, Juri,
>
> This series fixes 13 bugs of SCHED_DEADLINE. Then it shows the deadline
> bandwidth of each runqueue in sched_debug, and adds two selftests. The
> fixes come first, so that stable can take patches 1 to 13.
Thanks for splitting this out. I ran v2 in 8-CPU guests with lockdep and
proxy exec on. deadline_switch_test passes 5/5 (sysrq cases included),
and deadline_bw_test passes 45/46 (move_cancelled skips without
RT_GROUP_SCHED). There were no splats. Reverting patch 10 brings back
asleep_round_trip, stopped_switched_out and overrun_caught, as claimed.
cgroup's test_cpuset_prs.sh also passes, as on rc2.
I also covered two of the "not tested" items:
- cgroup v1 cpusets (two exclusive cpusets, root load balancing off):
admission, affinity, refused moves and hotplug all behave as on v2.
On both v1 and v2, moving a task A -> B -> A leaves its bandwidth
in B, so A is under-counted once the task dies. The leak is on rc2
too and the full v7 fixes it, so it is not a regression.
- sched_ext: the in-tree sched_ext selftests pass on v2, total_bw
included (dsp_local_on needs IKCONFIG_PROC for its __kconfig extern).
With scx_simple loaded, deadline_switch_test passes. The server cases
of deadline_bw_test fail, because they configure fair_server, which is
detached while ext is enabled. Pointed at ext_server, server_params,
server_rebuilds, server_states and server_reclaim pass. hotplug_server
still fails there, as scx_simple gets ejected when the CPU goes
offline (I haven't dug further). Could the test pick the server that
is active?
...
> Patch 10 clears the parameters of a task that leaves the class asleep.
> On v7.4-rc2, such a task kept them. That hid a bug of the rtmutex chain
> walk
Please move this into the changelog of patch 10 itself, as the cover
won't end up in git. IIUC, the owner then sits in the patch 8 bail-out
with a deadline of "now" until it unlocks. Other deadline tasks keep
their bandwidth, but lose latency, and RT/fair tasks on that CPU get
possibly starved.
Doesn't your separate "Fix an overflow of the 0-lag time with long
periods" also fits here, right before patch 10, which adds a caller of
that computation?
Patch 5: yes, keep my Reviewed-by on the version with the cpu_active()
check.
Thanks!
Juri