diff options
| author | Waiman Long <longman@redhat.com> | 2026-10-25 17:44:46 -0400 |
|---|---|---|
| committer | Tejun Heo <tj@kernel.org> | 2026-10-26 07:44:32 -1000 |
| commit | a7d89d92fdfbceb678d82710135d4eee2623d727 (patch) | |
| tree | 9a4496779d517f6e7b434fc0eaf1dd7cdfd65298 /scripts/basic | |
| parent | 356a3aa7404e420e6f19c5ed42db7b8bd0c7ee9f (diff) | |
| download | linux-a7d89d92fdfbceb678d82710135d4eee2623d727.tar.gz linux-a7d89d92fdfbceb678d82710135d4eee2623d727.zip | |
cgroup/cpuset: Release invalid isolated CPUs in compute_partition_effective_cpumask()
It is found by sashiko that when a child isolated partition with parent
root partition is invalidated in compute_partition_effective_cpumask(),
the switching of the isolated exclusive CPUs from child to parent will
not be reflected in isolated_cpus leading to CPU leakage. Fix that by
calling isolated_cpus_update() when that happens.
Also simplify compute_partition_effective_cpumask() by doing
child partition invalidation only for the special case of no more
effective_cpus left in a populated parent. The other case doesn't
actually warrant invalidation at this stage and subsequent iteration
in update_cpumasks_hier() and update_parent_effective_cpumask() for
that child should handle that.
Also drop the make_partition_invalid() helper by inlining it into
compute_partition_effective_cpumask() as it is the only caller.
A new test case is add to test_cpuset_prs.sh to verify this.
Fixes: 11e5f407b64a ("cgroup/cpuset: Keep track of CPUs in isolated partitions")
Signed-off-by: Waiman Long <longman@redhat.com>
Reviewed-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
Tested-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
