Re: [PATCH v13 06/36] sched/deadline: Keep departing bandwidth across a root domain rebuild

From: Mathieu Desnoyers

Date: Wed Dec 02 2026 - 09:54:46 EST


> Can dl_clear_root_domains() (and the dl_departed_cpu branch in
> dl_add_task_root_domain()) charge departed bandwidth to the wrong root
> domain when dl_se->dl_departed_cpu is split into a new child cpuset
> partition before the 0-lag timer fires?

Yes, until the 0-lag time of the departed tasks. The v12 review of
this patch found the same case. The v13 cover lists it as a known
limit, and v14 will keep it there.

> When a departed task returns to SCHED_DEADLINE in the same root domain
> before its 0-lag time, does deferring the old p->dl.dl_bw subtraction to
> dl_task_release_bw() after raw_spin_unlock(&dl_b->lock) double-count the
> task's bandwidth?

Yes. The admission check in sched_dl_overflow() still counts the old
bandwidth, as on v7.4-rc2. In a full root domain, sched_setattr() can
then fail with EBUSY. On success, both bandwidths count until
dl_task_release_bw() removes the old one, right after the check. The
v12 review of this patch found the same case. The v13 cover lists it as
a known limit, and v14 will keep it there.

Thanks,

Mathieu