Re: [PATCH v5 21/29] cgroup/cpuset: Reserve the bandwidth in the root domain a task moves to

From: Mathieu Desnoyers

Date: Sun Nov 08 2026 - 22:01:12 EST


On 2026-11-08 14:32, sashiko-bot@xxxxxxxxxx wrote:
> equal cpumask early exit skips set_cpus_allowed_dl()

This is the early exit of __set_cpus_allowed_ptr_locked(), as on patch
18. The next version skips it for an attach that reserved the bandwidth.

> __dl_task_bw_move_cpu() skips move on spanning cpumask

The attach reserves nothing here, by design: the root domain that counts
the task stays in the mask. If the task then has to leave its CPU and
lands in the other root domain, migrate_task_rq_dl() moves the bandwidth
there (patch 23). So total_bw stays right. What is skipped is the room
check in the root domain it lands in. That is the same for every move
without a reservation, as patch 23 says. The next version states it in
this patch's message.

> per-CPU reservation mismatch when task_cpu() changes

Thanks. The window is real: a wakeup between can_attach() and attach()
can move a sleeper, and the reservation is then not used. But the
bandwidth does not stay in the partition. The task's CPU is out of its
new mask, so migrate_task_rq_dl() moves the bandwidth when the task
leaves it. total_bw ends right. What is lost is the admission, in the
root domain the task lands in. It differs from the one reserved only
when the destination spans two root domains. This is the same as for a
task that changed its affinity or its policy in that window, so I leave
it as is.

Thanks,

Mathieu

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