Re: [PATCH -next RFC -v2 06/11] cpuset: introduce cpus_excl_conflict and mems_excl_conflict helpers

From: Waiman Long

Date: Mon Sep 15 2025 - 14:42:54 EST



On 9/8/25 11:32 PM, Chen Ridong wrote:
From: Chen Ridong <chenridong@xxxxxxxxxx>

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 both cpusets are non-exclusive, their 'cpuset.cpus.exclusive' values
must not intersect.

The term "non-exclusive" is somewhat confusing. I suppose you mean that the exclusive flag isn't set. However, exclusive flag is a cpuset v1 only feature and cpus.exclusive is a v2 only feature. They will not coexist. You may need to update the wording.

After you fix that, you can add

Reveiwed-by: Waiman Long <longman@xxxxxxxxxx>