Re: [PATCH v7 11/40] sched/deadline: Reset the donor's runtime at a deboost in the class

From: Mathieu Desnoyers

Date: Wed Nov 18 2026 - 08:36:14 EST


> Can a SCHED_DEADLINE task skip dl_deboost(&p->dl) here when switching
> from one deadline donor to another?

Yes, while the boost lasts. The first branch does not clear
dl_donor_refill. The flag set by the first donor's refill stays set
while the second donor boosts the task. At the last unlock,
rt_mutex_setprio(p, NULL) takes the else branch. There, dl_deboost()
starts a new period. So the task keeps nothing of the first donor after
the boost.

During the second boost, the task keeps the deadline and runtime it has,
as upstream does. Its own new period could indeed be earlier. But a
dl_deboost() at each change of top waiter would give the task a full
runtime of its own each time. A task whose top waiter changes often
would then exceed its bandwidth. So this is left as is. The cover letter
of the next version lists it under "Not changed".

> Does a task that still has SCHED_DEADLINE parameters
> (p->dl.dl_runtime != 0) keep the donor's refilled runtime and
> deadline when leaving the deadline class at deboost?

This is the same point as on patch 10. It is known, and upstream does
the same. A return to SCHED_DEADLINE before the inactive timer is
checked against the task's own parameters, by patches 35 and 36. The
cover letter of the next version states it more clearly under "Not
changed".

> In this cleared-donor fallback (!runtime || !deadline || !period),
> should dl_note_donor_refill(dl_se) also be called when
> dl_se->dl_deadline is non-zero?

No, this is intended, as answered on v6. The task has parameters of its
own. It keeps its own deadline, with no runtime left: an exhausted
period. After the deboost, the next update_curr_dl() throttles it until
its next period, as for any task that used up its runtime. Setting the
flag would make dl_deboost() start a new period. That would be a second
full runtime in the same period.

All three points were checked by reading.

Thanks,

Mathieu

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