From: Waiman Long <llong@redhat.com>
To: Sun Shaojie <sunshaojie@kylinos.cn>, chenridong@huaweicloud.com
Cc: tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com,
shuah@kernel.org, cgroups@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v1] cpuset: Avoid unnecessary partition invalidation
Date: Wed, 12 Nov 2025 23:12:13 -0500 [thread overview]
Message-ID: <b97e1f53-3b6a-4d2a-82fc-3150565e266a@redhat.com> (raw)
In-Reply-To: <20251113033322.431859-1-sunshaojie@kylinos.cn>
On 11/12/25 10:33 PM, Sun Shaojie wrote:
> The reviewer mentioned they couldn't see my original patch, so I'm
> re-quoting the key changes below for clarity:
>
>> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
>> index 52468d2c178a..e0d27c9a101a 100644
>> --- a/kernel/cgroup/cpuset.c
>> +++ b/kernel/cgroup/cpuset.c
>> @@ -586,14 +586,14 @@ static inline bool cpusets_are_exclusive(struct cpuset *cs1, struct cpuset *cs2)
>> * Returns: true if CPU exclusivity conflict exists, false otherwise
>> *
>> * Conflict detection rules:
>> - * 1. If either cpuset is CPU exclusive, they must be mutually exclusive
>> + * 1. If both cpusets are exclusive, they must be mutually exclusive
>> * 2. exclusive_cpus masks cannot intersect between cpusets
>> * 3. The allowed CPUs of one cpuset cannot be a subset of another's exclusive CPUs
>> */
>> 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);
>>
>> /* Exclusive_cpus cannot intersect */
> Here are the main changes, where the conflict check for step #6 in Table 2
> is performed. And these changes have no effect on cgroup v1.
cpus_excl_conflict() is called by validate_change() which is used for
both v1 and v2.
Cheers,
Longman
next prev parent reply other threads:[~2025-11-13 4:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-12 2:11 [PATCH v1] cpuset: Avoid unnecessary partition invalidation Sun Shaojie
2025-11-12 3:33 ` Chen Ridong
2025-11-12 4:09 ` Waiman Long
2025-11-12 9:46 ` Sun Shaojie
2025-11-12 11:02 ` Chen Ridong
2025-11-12 18:05 ` Waiman Long
2025-11-13 1:21 ` Chen Ridong
2025-11-13 3:33 ` Sun Shaojie
2025-11-13 4:12 ` Waiman Long [this message]
2025-11-13 6:26 ` Chen Ridong
2025-11-12 16:40 ` Waiman Long
2025-11-13 6:42 ` Sun Shaojie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b97e1f53-3b6a-4d2a-82fc-3150565e266a@redhat.com \
--to=llong@redhat.com \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huaweicloud.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=shuah@kernel.org \
--cc=sunshaojie@kylinos.cn \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox