Re: [PATCH v8 23/33] sched/deadline: Reset the donor's runtime at a deboost in the class

From: Mathieu Desnoyers

Date: Fri Nov 20 2026 - 08:53:22 EST


> Can a SCHED_DEADLINE task keep a departed donor's refilled runtime and
> deadline when switching to another deadline top waiter?

Yes, and v7.4-rc2 does the same. While boosted, p runs on the runtime
left from its donors. dl_donor_refill stays set, so the final deboost
starts p's own period. Nothing of the first donor lasts past the end of
the boost. A deboost at each change of donor is possible. But it would
give p a fresh period of its own at each change.

> Should the (dl_se->runtime < 0 || dl_se->dl_yielded) path also call
> dl_note_donor_refill(dl_se)?

No. That branch refills nothing. It sets to 0 the runtime of an entity
whose own runtime is spent, or that yielded. If a donor refilled p
before, the flag is already set. If not, the runtime and the deadline
are p's own. Throttling p until its next period is then right. Setting
the flag there would give p a free period at the deboost.

Thanks,

Mathieu

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