cgroup/cpuset: Remove remote_partition_check() & make update_cpumasks_hier() handle...
authorWaiman Long <longman@redhat.com>
Sun, 30 Mar 2025 21:52:42 +0000 (17:52 -0400)
committerTejun Heo <tj@kernel.org>
Mon, 31 Mar 2025 23:25:56 +0000 (13:25 -1000)
commitf62a5d39368e34a966c8df63e1f05eed7fe9c5de
tree0cea915419c9fa03b67a23fd083d31307dec85b2
parent8bf450f3aec3d1bbd725d179502c64b8992588e4
cgroup/cpuset: Remove remote_partition_check() & make update_cpumasks_hier() handle remote partition

Currently, changes in exclusive CPUs are being handled in
remote_partition_check() by disabling conflicting remote partitions.
However, that may lead to results unexpected by the users. Fix
this problem by removing remote_partition_check() and making
update_cpumasks_hier() handle changes in descendant remote partitions
properly.

The compute_effective_exclusive_cpumask() function is enhanced to check
the exclusive_cpus and effective_xcpus from siblings and excluded them
in its effective exclusive CPUs computation and return a value to show if
there is any sibling conflicts.  This is somewhat like the cpu_exclusive
flag check in validate_change(). This is the initial step to enable us
to retire the use of cpu_exclusive flag in cgroup v2 in the future.

One of the tests in the TEST_MATRIX of the test_cpuset_prs.sh
script has to be updated due to changes in the way a child remote
partition root is being handled (updated instead of invalidation)
in update_cpumasks_hier().

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c
tools/testing/selftests/cgroup/test_cpuset_prs.sh