Re: [PATCH v2 09/21] sched/deadline: Keep departing bandwidth across a root domain rebuild

From: Mathieu Desnoyers

Date: Thu Nov 05 2026 - 14:15:34 EST


On 2026-11-04 17:44, sashiko-bot@xxxxxxxxxx wrote:
[...]

[Severity: High]
As reported by Sashiko on v1 [1], can priority-inheritance boosting of a
departed task before its 0-lag time corrupt root-domain total_bw accounting?

A departed task boosted into the class before its 0-lag time is counted
once, wherever a rebuild runs: the walk finds it in the class and counts
it in its cpuset's root domain, the record is updated, and the release at
the deboost reads the record. Where the deboost races the walk, the
departing bandwidth is dropped for the remaining lag, as it is for a
departed task whose recorded CPU went inactive; the generation keeps the
release out, so nothing underflows. The release before the 0-lag time of
a task boosted and deboosted while asleep, after leaving the class, is
early by at most the lag, where the baseline leaked it for good.

A rebuild that finds a CPU for a task an earlier one dropped counts it again,
which is the intent: the bandwidth of a departed task is held until its 0-lag
time.

Thanks,

Mathieu

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