]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
cgroup/cpuset: Free DL BW in case can_attach() fails
authorDietmar Eggemann <dietmar.eggemann@arm.com>
Mon, 8 May 2023 07:58:54 +0000 (09:58 +0200)
committerTejun Heo <tj@kernel.org>
Mon, 8 May 2023 23:22:33 +0000 (13:22 -1000)
commit2ef269ef1ac006acf974793d975539244d77b28f
tree6bbacbb12b57a9f939a4c475488c7d43ad5b08dc
parent85989106feb734437e2d598b639991b9185a43a6
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>
include/linux/sched.h
kernel/cgroup/cpuset.c
kernel/sched/core.c