Re: [PATCH v13 18/36] sched/deadline: Make a rebuild count a task in the root domain it runs in

From: Mathieu Desnoyers

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


> When a rebuild leaves a sleeping task out because its allowed isolated CPUs
> went offline, p->dl.dl_bw_gen stays behind dl_bw_gen while
> p->dl.dl_bw_cpu still points to an offline CPU whose runqueue is attached
> to def_root_domain.
>
> If the sleeping task is then moved via cpuset_attach to a cpuset with
> active CPUs in def_root_domain (such as an active isolcpus="domain" CPU or
> an isolated cpuset partition), can __dl_task_bw_move_cpu() and
> set_cpus_allowed_dl() skip accounting its bandwidth in def_root_domain?

Yes. In v14, __dl_task_bw_move_cpu() will not return -1 for a task
with an old dl_bw_gen. cpuset_can_attach() will then reserve room in
the destination, and set_cpus_allowed_dl() will count the bandwidth
there.

Thanks,

Mathieu