Re: [PATCH v10 03/40] sched/deadline: Record the root domain holding a task's bandwidth

From: Mathieu Desnoyers

Date: Mon Nov 23 2026 - 08:57:41 EST


> Can dl_task_admit_cpu() return an offline CPU when p is asleep on a CPU
> that went offline?

Yes. In the top cpuset, or without cpusets, the offline does not remove
the CPU from cpus_mask. v11 will also fall back to an active CPU of the
mask when task_cpu() is not active. A new case,
hotplug_asleep_setattr, will make a deadline task of a task asleep on a
CPU that went offline. Without the fix, sched_setattr() fails with
EBUSY. v7.4-rc2 charges the root domain of task_cpu() too.

> When p->dl.dl_bw is 0 and p was moved to another cpuset partition while
> asleep, doesn't task_cpu(p) still point to the old root domain that p left?

Yes, by reading. v11 will check such a task against dl_task_admit_cpu(),
as sched_setattr() does: the CPU the task runs on once it wakes. It
needs a bandwidth that rounds to 0, so no case will test it.

Thanks,

Mathieu

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