Re: [PATCH v8 32/33] sched/deadline: Check the runtime of a task whose parameters change
From: Mathieu Desnoyers
Date: Fri Nov 20 2026 - 08:54:10 EST
> Does calling update_dl_entity() directly from dl_deboost() bypass
> dl_check_constrained_dl() and update sleeping tasks prematurely?
Yes for a constrained task. In v9, dl_deboost() will leave the check to
the next enqueue when the task is past its deadline and before its next
period. The enqueue will then throttle it, as dl_check_constrained_dl()
does.
For a sleeping owner, the wakeup checks the runtime again. The early
check gives it no more runtime.
> Can an unboosted SCHED_DEADLINE lock owner miss a required PI boost when
> update_dl_entity() pushes its deadline past its top waiter's deadline?
Yes, and this is older. On v7.4-rc2, a replenishment or a wakeup can
also push the deadline of an unboosted owner past its top waiter. Only
rt_mutex_setprio() compares them. This patch adds one more such path. I
would rather fix all of them in a follow-up.
> Does __setparam_dl() leave dl_new_params unset when a task leaves
> SCHED_DEADLINE and re-enters with the same parameters while PI-boosted?
Yes, by design. A task that leaves the class keeps its CBS state, so
that changing class gives it no fresh runtime. This is the intent of
commit a649f237db18 ("sched,dl: Fix sched class hopping CBS hole"). If
the old deadline has passed at the deboost, the enqueue starts a new
period. The leftover is never more than a new entry would get.
> When sched_setattr() shrinks the parameters of an unboosted task blocked
> on an rt_mutex, does rt_mutex_adjust_pi() use a stale p->dl.deadline?
Yes. v7.4-rc2 has it too. In v9, prio_changed_dl() will check the
runtime of a task that is blocked on an rt_mutex and not boosted.
rt_mutex_adjust_pi() will then requeue the waiter with the result. A new
case, setattr_blocked_new_period, fails without the fix and passes with
it.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com