Re: [PATCH v13 31/36] sched/deadline: Count a task that departs while a rebuild walks the tasks
From: Mathieu Desnoyers
Date: Wed Dec 02 2026 - 09:55:03 EST
> Can dl_task_depart() charge the departing task's bandwidth to the wrong
> root domain when task_cpu(p) or dl_se->dl_bw_cpu is still active but no
> longer in p->cpus_mask?
Yes. In v14, dl_task_depart() will count the task on the CPU that the
walk of the task list would pick. A new helper, dl_task_count_cpu(),
will pick it as dl_task_rebuild_cpu() does. Unlike the walk, it will
not read the CPUs of the cpuset, which needs cpuset_mutex.
The remark on dl_bw_skip_gen holds for this patch alone. The next
patch of the series sets it in that case.
Thanks,
Mathieu