Re: [PATCH v11 30/43] sched/deadline: Start a period for a task that enters the class blocked
From: Mathieu Desnoyers
Date: Fri Nov 27 2026 - 08:49:26 EST
> Can dl_boost_blocked() leave an expired p->dl.deadline in place when a
> blocked task still has a non-zero dl_se->dl_deadline?
Yes, as on v7.4-rc2. This patch starts a period only for a blocked
task with no parameters of its own. A task that left the class keeps
its parameters. So its passed deadline stays in its waiter node, which
then sorts first. The cover lists this case with the known limits: "a
task that comes back to the class while it waits".
> Does switched_to_dl() skip replenish_dl_new_period() when a task with
> p->dl.deadline == 0 enters SCHED_DEADLINE with a constrained reservation
> while blocked on an rt_mutex?
Yes for the deadline of 0, in the first dl_period after boot. Patch 37
replaces this test with dl_in_constrained_gap(), and v12 will test for
a deadline of 0 there. Patch 37 also fits the period to the new
parameters at the change. So from patch 37 on, the test no longer mixes
old and new parameters.
> Does the !p->dl.dl_throttled check in switched_to_dl() also prevent a
> throttled departed task from receiving a donor period when it is boosted
> back into SCHED_DEADLINE?
This is the limit of your first point: the waiter sorts with its passed
deadline. The task does not run early. Its wakeup lifts the throttle,
and starts a period of the donor, as on v7.4-rc2.
Thanks,
Mathieu