From: Chen Ridong <chenridong@huaweicloud.com>
To: Waiman Long <llong@redhat.com>,
tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
lujialin4@huawei.com, chenridong@huawei.com
Subject: Re: [PATCH cgroup/for-next 1/2] cpuset: fix failure to enable isolated partition when containing isolcpus
Date: Fri, 19 Sep 2025 08:58:27 +0800 [thread overview]
Message-ID: <a1dea9aa-2a9f-4157-b2dc-32b64b9d7679@huaweicloud.com> (raw)
In-Reply-To: <0ee6288f-c621-4c18-bd42-22dd4aa2d826@redhat.com>
On 2025/9/19 2:02, Waiman Long wrote:
> On 9/18/25 8:25 AM, Chen Ridong wrote:
>> From: Chen Ridong <chenridong@huawei.com>
>>
>> The 'isolcpus' parameter specified at boot time can be assigned to an
>> isolated partition. While it is valid put the 'isolcpus' in an isolated
>> partition, attempting to change a member cpuset to an isolated partition
>> will fail if the cpuset contains any 'isolcpus'.
>>
>> For example, the system boots with 'isolcpus=9', and the following
>> configuration works correctly:
>>
>> # cd /sys/fs/cgroup/
>> # mkdir test
>> # echo 1 > test/cpuset.cpus
>> # echo isolated > test/cpuset.cpus.partition
>> # cat test/cpuset.cpus.partition
>> isolated
>> # echo 9 > test/cpuset.cpus
>> # cat test/cpuset.cpus.partition
>> isolated
>> # cat test/cpuset.cpus
>> 9
>>
>> However, the following steps to convert a member cpuset to an isolated
>> partition will fail:
>>
>> # cd /sys/fs/cgroup/
>> # mkdir test
>> # echo 9 > test/cpuset.cpus
>> # echo isolated > test/cpuset.cpus.partition
>> # cat test/cpuset.cpus.partition
>> isolated invalid (partition config conflicts with housekeeping setup)
>>
>> The issue occurs because the new partition state (new_prs) is used for
>> validation against housekeeping constraints before it has been properly
>> updated. To resolve this, move the assignment of new_prs before the
>> housekeeping validation check when enabling a root partition.
>>
>> Fixes: 11e5f407b64a ("cgroup/cpuset: Keep track of CPUs in isolated partitions")
>> Signed-off-by: Chen Ridong <chenridong@huawei.com>
>
> Thanks for finding the bug. However, I think the commit to be fixed should be 4a74e418881f
> ("cgroup/cpuset: Check partition conflict with housekeeping setup"), not the one you listed above.
>
Thank you for the correction, Longman, you are right. I'll update the commit ID with the correct one
--
Best regards,
Ridong
next prev parent reply other threads:[~2025-09-19 0:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-18 12:25 [PATCH cgroup/for-next 0/2] cpuset: fix failure to enable isolated partition when containing isolcpus Chen Ridong
2025-09-18 12:25 ` [PATCH cgroup/for-next 1/2] " Chen Ridong
2025-09-18 18:02 ` Waiman Long
2025-09-19 0:58 ` Chen Ridong [this message]
2025-09-18 12:25 ` [PATCH cgroup/for-next 2/2] cpuset: Use new excpus for nocpu error check when enabling root partition Chen Ridong
2025-09-18 18:10 ` Waiman Long
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=a1dea9aa-2a9f-4157-b2dc-32b64b9d7679@huaweicloud.com \
--to=chenridong@huaweicloud.com \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huawei.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llong@redhat.com \
--cc=lujialin4@huawei.com \
--cc=mkoutny@suse.com \
--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;
as well as URLs for NNTP newsgroup(s).