On 2025/11/13 22:57, Waiman Long wrote:
On 11/13/25 8:14 AM, Sun Shaojie wrote:
... diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 52468d2c178a..3240b3ab5998 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -592,8 +592,13 @@ static inline bool cpusets_are_exclusive(struct cpuset *cs1, struct cpuset *cs2) */ static inline bool cpus_excl_conflict(struct cpuset *cs1, struct cpuset *cs2) {
- /* If either cpuset is exclusive, check if they are mutually exclusive */
- if (is_cpu_exclusive(cs1) || is_cpu_exclusive(cs2))
- /* If both cpusets are exclusive, check if they are mutually exclusive */
- if (is_cpu_exclusive(cs1) && is_cpu_exclusive(cs2))
return !cpusets_are_exclusive(cs1, cs2);- /* In cgroup-v1, if either cpuset is exclusive, check if they are mutually exclusive */
- if (!is_in_v2_mode() &&
You should just use cpuset_v2() here as is_in_v2_mode() checks an additional v1 specific mode that is irrelevant wrt to exclusive bit handling. Also please update the functional comment about difference in v1 vs. v2 behavior.
Note that we may have to update other conflict checking code in cpuset.c to make this new behavior more consistent.
Thanks, Longman
return !cpusets_are_exclusive(cs1, cs2);(is_cpu_exclusive(cs1) != is_cpu_exclusive(cs2)))/* Exclusive_cpus cannot intersect */
Thank you for the correction.I will update the patch accordingly.
Tnanks, Sun Shaojie