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

From: Mathieu Desnoyers

Date: Thu Nov 19 2026 - 08:40:23 EST


> Does calling set_deadline() on rb_waiter_tid while W is already blocked on
> pi_lock give W an absolute deadline of 0 instead of a deadline later than O
> and D?

Yes. I checked it in a guest. On this series, a task made
SCHED_DEADLINE while it waits on a PI mutex keeps a deadline of 0. So W
boosts O at once, and the case passes without the deboost it was
written for. On v7, the case failed without "sched/deadline: Check the
runtime of a task whose parameters change". v7 also had "sched/deadline:
Start a period for a task that enters the class blocked", which gives W
a new period. Both are in the second series. I will move the case
there.

> This isn't a bug, but fair_tid is only written here and never read (which
> triggers -Wunused-but-set-variable under Clang).

Same as v1 [1]: these are left from the split, and the second series
uses them.

> Does pi_chain_donor_leaves() pass on this series without an rt_mutex chain
> walk change to propagate M->dl.pi_se to O when M's sort keys do not move?

Same as v1: it passes in every run, in 25 guests with this series.

> Since death_pi_waiter, death_pi_owner, and death_pi_deadline_owner each run
> in a separate child process forked by run_in(), doesn't the process-private
> static ready variable start at 0 in every child?

Right. My v2 fix does not work. I will keep the flag in the shared
mapping, next to the lock.

> On a CONFIG_RT_GROUP_SCHED=y system where the cpu controller is already
> enabled in root/cgroup.subtree_control, won't server_client(1) fail
> sched_setscheduler(0, SCHED_FIFO, &sp) in cg_p with EPERM and cause
> server_states() to time out and fail instead of skipping?

Right. Our guests with CONFIG_RT_GROUP_SCHED did not have the cpu
controller on. I will make the case skip there.

[1] https://lore.kernel.org/all/eb414b6f-ea8f-4dd5-94ca-0915490ff37b@xxxxxxxxxxxx/

Thanks,

Mathieu

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