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

From: Mathieu Desnoyers

Date: Fri Nov 20 2026 - 14:38:37 EST


> Can this dl_tasks_keep_without() check fail with PERR_DLTASK against a
> stale root domain span before the sched domains are rebuilt?

Your first case: yes. It is the false refusal found on v8. v10 will
fix it. For a "root" partition, the check will also accept the CPUs
that the partition root has after the change. The rebuild gives them
to its root domain. A new case, partition_grows_child_valid, will test
your first case. Without the fix, the child stays invalid.

In your second case, the partition staying invalid is intended. Its
deadline task is counted in the root domain of the parent. If cpuset
made the partition valid, the task would move to the root domain of the
onlined CPU with no check for room. While the partition stays invalid,
it runs on CPUs of the parent, and the root domain of the parent counts
it.

> Should dl_task_keeps_root_domain() check &p->cpus_mask instead of
> p->cpus_ptr, as dl_task_leaves_span() and dl_task_rebuild_cpu() do?

Yes, by reading. v10 will test cpus_mask, as dl_task_leaves_span()
does. No case will test it. It needs a task preempted inside
migrate_disable() at the time of the write.

Thanks,

Mathieu

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