Re: [PATCH v7 26/40] sched/deadline: Make a rebuild count a task in the root domain it runs in
From: Mathieu Desnoyers
Date: Wed Nov 18 2026 - 08:40:28 EST
> Can returning recorded here without checking the task's cpuset charge
> the bandwidth to a newly created partition that no longer contains
> the task?
Yes, thanks. The record can name a CPU that a partition root took since.
With no active CPU in the mask, the next version asks the cpuset first.
It keeps the CPU recorded only if the cpuset holds it.
The early return covered two cases. A task that
dl_task_offline_migration() moved to that CPU is queued there. The test
before it already catches that task. A task that an earlier rebuild
counted there keeps the record if its cpuset holds the CPU. A task
asleep wakes up through select_fallback_rq(), on a CPU of its cpuset. So
the cpuset is where it runs.
This was found by reading. A new test case, rebuild_record_taken,
shows it. A partition root takes the CPU recorded with a sleeping task.
On v7 the partition counts the task, which then wakes up outside it.
With the next version the task is counted where it wakes up. That held
in each of 7 runs on both.
> Does calling dl_get_task_effective_cpus() here read a stale
> HK_TYPE_DOMAIN mask during cpuset partition transitions?
Yes. Upstream reads it there too, for every task. This patch only
reaches it for a task with no active CPU in its mask. With admission
control on, patch 29 refuses the offline that leads there. The next
version reads HK_TYPE_DOMAIN_BOOT in dl_get_task_effective_cpus(), as
the rest of the series does. A task whose mask holds only CPUs isolated
at boot runs in def_root_domain, whatever the partitions do.
This was checked by reading, not reproduced.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com