summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGuopeng Zhang <zhangguopeng@kylinos.cn>2026-04-17 11:37:41 +0800
committerTejun Heo <tj@kernel.org>2026-04-17 08:57:37 -1000
commit41d701ddc36d5301b44ea79529f3cf03c541c1e1 (patch)
tree523c05c96efdf4fa91257c96bf42b15b0c6e2c51 /include
parentc802f460dd485c1332b5a35e7adcfb2bc22536a2 (diff)
cgroup/cpuset: record DL BW alloc CPU for attach rollback
cpuset_can_attach() allocates DL bandwidth only when migrating deadline tasks to a disjoint CPU mask, but cpuset_cancel_attach() rolls back based only on nr_migrate_dl_tasks. This makes the DL bandwidth alloc/free paths asymmetric: rollback can call dl_bw_free() even when no dl_bw_alloc() was done. Rollback also needs to undo the reservation against the same CPU/root domain that was charged. Record the CPU used by dl_bw_alloc() and use that state in cpuset_cancel_attach(). If no allocation happened, dl_bw_cpu stays at -1 and rollback skips dl_bw_free(). If allocation did happen, bandwidth is returned to the same CPU/root domain. Successful attach paths are unchanged. This only fixes failed attach rollback accounting. Fixes: 2ef269ef1ac0 ("cgroup/cpuset: Free DL BW in case can_attach() fails") Signed-off-by: Guopeng Zhang <zhangguopeng@kylinos.cn> Reviewed-by: Waiman Long <longman@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions