Re: [PATCH v10 38/40] sched/deadline: Boost an owner that cannot run on its own reservation

From: Mathieu Desnoyers

Date: Mon Nov 23 2026 - 09:02:11 EST


> When p is a deadline task blocked on another rt_mutex (!scope->queued),
> does dl_boost_blocked(p) leave p->dl.deadline stale for the rest of the PI
> chain walk?

p keeps its own deadline in its waiter node. A boost never gives the
owner the deadline of its waiter. For an owner that cannot run on its
own reservation, v11 will start a period of the donor at the boost. Its
waiter node then gets that deadline.

> When a task that was boosted while throttled (own_runtime <= 0) is
> deboosted before own_deadline, does restoring own_runtime without restoring
> dl_throttled leave the task runnable on dl_rq with exhausted runtime?

Yes. In v11, the deboost will throttle it again until its own next
period, and reschedule it if it runs. A new case,
pi_owner_held_new_params, will test it. In testing without the fix, the
waiter got the lock at 103ms, instead of before 60ms.

> Should switched_from_dl() also restore own_deadline, own_runtime and
> own_period_start when dl_boost_held is set?

Yes. In v11, it will put back the saved values, as dl_deboost() does.

> Once now reaches own_period_start + dl_period, dl_waiter_boosts() compares
> pi_task against now + dl_se->dl_deadline, but if it returns false and
> triggers a deboost while p is pi-blocked on another rt_mutex, does
> dl_deboost() restore the expired own_deadline instead of starting a new
> period?

Yes. In v11, the deboost will start a period of the task's own once its
saved period has ended. A new case, pi_owner_held_long, will test it.
Without the fix, the refill prints "sched: DL replenish lagged too
much".

> If an owner is throttled while going to sleep, boosted while asleep, and
> then wakes up before own_deadline while still boosted, does
> enqueue_task_dl() fail to replenish it from the donor?

Yes in v10. In v11, it gets runtime from the donor period that the
boost starts: see your last point.

> When a runnable throttled owner (runtime <= 0) is boosted, does the
> while (dl_se->runtime <= 0) loop right above this check advance
> dl_se->deadline from own_deadline by the donor's period instead of
> starting a donor period at rq_clock(rq)?

Yes. In v11, dl_boost_start() will start a period of the donor. A new
case, pi_owner_throttled_rival, will test it. In testing without the
fix, a deadline task between the two deadlines ran first. The waiter
got the lock at 53ms, instead of before 35ms.

Thanks,

Mathieu

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