Re: [PATCH v12 17/43] cgroup/cpuset: Refuse to take a deadline task out of its root domain

From: Mathieu Desnoyers

Date: Tue Dec 01 2026 - 11:20:32 EST


> With isolcpus=domain, can a deadline task counted in def_root_domain bypass
> this check when a PRS_ISOLATED partition returns a housekeeping CPU to
> top_cpuset while taking a boot-isolated CPU?

Yes. In v13, dl_task_keeps_root_domain() will take a fourth argument,
@leaving. It holds the CPUs that the rebuild takes out of the default
root domain. The check will no longer count these CPUs as CPUs of the
default root domain. The new dl_tasks_keep_given_back() will make
update_cpumask() and update_exclusive_cpumask() refuse such a write with
EBUSY. This patch makes a partition invalid when it takes such CPUs.
Here that would not help: the invalid partition would give the CPUs back
all the same. The new case partition_gives_back_refused of
deadline_bw_test tests this.

> Can update_sibling_cpumasks() cause dl_tasks_keep_without() to skip its
> check when a growing parent partition has two invalid child partitions?

Yes. The tasks of the second child then run in a root domain that did
not admit them, as on v7.4-rc2. v13 does not fix it. The message of this
patch and the v13 cover letter will list it as a known limit.

> Should dl_tasks_keep_root_domain() and dl_tasks_keep_without() check
> !dl_tasks_hold_bw() before walking the hierarchy, and skip unchanged
> subtrees with css_rightmost_descendant(pos_css)?

The walk of the tasks already does this. dl_tasks_keep_cpus() calls
dl_tasks_hold_bw() first. It returns at once without admission control,
or when no task holds a bandwidth. The walk of the cpusets stays. It
runs only on a write to a cpuset, and update_cpumasks_hier() walks the
same cpusets on that write. v13 leaves it as it is.

Thanks,

Mathieu