Re: [PATCH v7 18/40] sched/deadline: Record the root domain holding a task's bandwidth
From: Mathieu Desnoyers
Date: Wed Nov 18 2026 - 08:37:34 EST
> Should __sched_setscheduler() also use the root domain recorded in
> p->dl.dl_bw_cpu rather than rq->rd when validating a deadline task's
> root domain span and dl_bw.bw?
This repeats a point from v6, and the answer is the same. That EPERM is
the baseline's affinity check. This series does not change it. It is a
gate only. The admission test is sched_dl_overflow(), and it uses the
recorded CPU. So the gate can refuse wrongly, but it never admits
wrongly.
Patch 23 needs the refusal. sched_setattr() can make a task a deadline
task right after a cpuset move. That task has no recorded CPU yet. The
CPU it is on is the only one the check can use.
The hotplug case is the same check, with the same effect. Once the task
has run on its new CPUs, its parameters can be changed as usual.
The v7 cover letter lists this under "Not changed" for the partition
move. The next version widens that line to a task asleep on a CPU that
went offline. All of this was checked by reading.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com