diff options
author | Dietmar Eggemann <dietmar.eggemann@arm.com> | 2023-05-08 09:58:54 +0200 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2023-05-08 13:22:33 -1000 |
commit | 2ef269ef1ac006acf974793d975539244d77b28f (patch) | |
tree | 6bbacbb12b57a9f939a4c475488c7d43ad5b08dc /include/linux/sched.h | |
parent | 85989106feb734437e2d598b639991b9185a43a6 (diff) | |
download | linux-stable-2ef269ef1ac006acf974793d975539244d77b28f.tar.gz linux-stable-2ef269ef1ac006acf974793d975539244d77b28f.tar.bz2 linux-stable-2ef269ef1ac006acf974793d975539244d77b28f.zip |
cgroup/cpuset: Free DL BW in case can_attach() fails
cpuset_can_attach() can fail. Postpone DL BW allocation until all tasks
have been checked. DL BW is not allocated per-task but as a sum over
all DL tasks migrating.
If multiple controllers are attached to the cgroup next to the cpuset
controller a non-cpuset can_attach() can fail. In this case free DL BW
in cpuset_cancel_attach().
Finally, update cpuset DL task count (nr_deadline_tasks) only in
cpuset_attach().
Suggested-by: Waiman Long <longman@redhat.com>
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Juri Lelli <juri.lelli@redhat.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 0bee06542450..2553918f0b61 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -1852,7 +1852,7 @@ current_restore_flags(unsigned long orig_flags, unsigned long flags) } extern int cpuset_cpumask_can_shrink(const struct cpumask *cur, const struct cpumask *trial); -extern int task_can_attach(struct task_struct *p, const struct cpumask *cs_effective_cpus); +extern int task_can_attach(struct task_struct *p); extern int dl_bw_alloc(int cpu, u64 dl_bw); extern void dl_bw_free(int cpu, u64 dl_bw); #ifdef CONFIG_SMP |