Re: [PATCH 16/16] selftests/sched: Add a test of SCHED_DEADLINE bandwidth accounting

From: Mathieu Desnoyers

Date: Wed Nov 18 2026 - 16:12:37 EST


> Does deboost_new_params_reboost() exercise reboosting after a deboost as
> its comment describes?

It reaches the check it was written for. It failed on v7, before the
split, with the bug that "sched/deadline: Check the runtime of a task
whose parameters change" fixes. I have not checked your
point on the deadline of 0 in the waiter node.

> fair_tid is set in pi_init_lock2() but never read, which triggers a
> -Wunused-but-set-variable warning under -Wall.

These come from splitting the test. They serve the cases that the second
series adds back. The test builds with no warning, as fair_tid is a
global.

> Does pi_chain_donor_leaves() fail because Z is never propagated past M to
> O as O's donor?

No. It passes in every run, in 25 guests with this series. The missed
propagation is what pi_chain_top_moves tests. That case comes with the
two rtmutex fixes, in the second series.

> What happens in move_cancelled() when deadline_bw_test is started from a
> non-root cgroup (such as a systemd session or service cgroup)?

Right. The case assumes the root cgroup, and it turns the cpu controller
off even if it was on before. I will fix both.

> In the same loop, late.done is a plain uint64_t written by late_setter()
> while move_cancelled() polls it in wait_for(5000, late.done), which is a
> data race.

Right. I will make it atomic, and join the thread after the reap.

> Does shm_lock_init() re-initialize shm_lock without destroying it across
> death_pi_waiter, death_pi_owner, and death_pi_deadline_owner?

Yes. I will destroy the mutex and its attributes.

> Can hotplug_server() pass when probe(NULL) fails and returns -1?

Yes. I will check the probes in the three cases.

> Should rebuild_record_taken() return KSFT_SKIP instead of KSFT_FAIL when
> total_bw_of(a) returns -1 because /sys/kernel/debug/sched/debug is not
> available?

Yes.

> Does rebuild_record_taken() fail when CPU 0 is isolated with
> isolcpus=domain,0,1?

Yes. With 7 CPUs and isolcpus=domain,0,1, it fails in 3 runs of 3:
the task wakes on CPU 0. With the second series, it passes in 3 of 3.
The case tests "sched/deadline: Make a rebuild count a task in the root
domain it runs in", of the second series. It belongs there. It passed
in our runs only because the guests with isolated CPUs had too few
CPUs to run it. I will move it to the second series.

Thanks,

Mathieu

--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com