]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cpuset: introduce cpus_excl_conflict and mems_excl_conflict helpers
authorChen Ridong <chenridong@huawei.com>
Wed, 17 Sep 2025 06:04:49 +0000 (06:04 +0000)
committerTejun Heo <tj@kernel.org>
Wed, 17 Sep 2025 18:37:30 +0000 (08:37 -1000)
commit8daab66eb329ed2fe7e2922c3739dfa53dcf4694
tree5bee00121fc160142120da0d2514f2140ad794c2
parentc5866c9a007deb92717fc0b94ac47b47291748be
cpuset: introduce cpus_excl_conflict and mems_excl_conflict helpers

This patch adds cpus_excl_conflict() and mems_excl_conflict() helper
functions to improve code readability and maintainability. The exclusive
conflict checking follows these rules:

1. If either cpuset has the 'exclusive' flag set, their user_xcpus must
   not have any overlap.
2. If neither cpuset has the 'exclusive' flag set, their
   'cpuset.cpus.exclusive' (only for v2) values must not intersect.
3. The 'cpuset.cpus' of one cpuset must not form a subset of another
   cpuset's 'cpuset.cpus.exclusive'.

Signed-off-by: Chen Ridong <chenridong@huawei.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cgroup/cpuset.c