]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cgroup/cpuset: Add test cases for sibling CPU exclusion on partition update
authorSun Shaojie <sunshaojie@kylinos.cn>
Wed, 27 May 2026 07:05:09 +0000 (15:05 +0800)
committerTejun Heo <tj@kernel.org>
Wed, 27 May 2026 18:59:17 +0000 (08:59 -1000)
commit645c3b7ef1a7eed9627664bd11d7a8eb4519ee15
treee7d327bcc88bbf49606813eb269245b276e5c3fb
parent0a68853de27b522bca2b9934127277185374a24f
cgroup/cpuset: Add test cases for sibling CPU exclusion on partition update

When sibling CPU exclusion occurs, a partition's effective_xcpus may be
a subset of its user_xcpus. The partcmd_update path must use
effective_xcpus instead of user_xcpus when calculating CPUs to return
to or request from the parent.

Add two test cases to verify this behavior:

  1) Narrowing cpuset.cpus to only the sibling-excluded CPUs should not
     return CPUs to parent that the partition never actually owned.

  2) Expanding cpuset.cpus after a sibling becomes a member should
     correctly request the additional CPUs from parent.

Co-developed-by: Zhang Guopeng <zhangguopeng@kylinos.cn>
Signed-off-by: Zhang Guopeng <zhangguopeng@kylinos.cn>
Signed-off-by: Sun Shaojie <sunshaojie@kylinos.cn>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/testing/selftests/cgroup/test_cpuset_prs.sh