Re: [PATCH v10 37/40] sched/deadline: Keep the start of the period across a change of dl_deadline
From: Mathieu Desnoyers
Date: Mon Nov 23 2026 - 09:01:49 EST
> Can a constrained task whose dl_deadline is increased to equal dl_period
> during an active period still bypass throttling in the gap between its
> current deadline and its next period?
Yes. We answered "not a bug" on v9: with period_start kept, it is one.
In v11, sched_setattr() will keep the end of a period in progress, and
move its deadline to period_start plus the new dl_deadline. A new case,
deadline_widened_asleep, will test it. In testing without the fix, the
task got 10ms in its period instead of the 2ms it had left.
> Does advancing dl_se->deadline by period here keep the old relative
> deadline offset across future periods after sched_setattr() changes
> dl_deadline?
Yes. This patch introduced it: v7.4-rc2 shifted the period instead. v11
will set the deadline to period_start plus dl_deadline when the loop
runs, for an entity that is not boosted. A new case,
deadline_grows_running, will test it. In testing without the fix, the
task ran 69ms after its wakeup.
The same change covers a shorter dl_period while the task is
throttled. The refill would otherwise print "sched: DL
replenish lagged too much". A new case, period_shrunk_throttled, will
test it.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com