[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a1dea9aa-2a9f-4157-b2dc-32b64b9d7679@huaweicloud.com>
Date: Fri, 19 Sep 2025 08:58:27 +0800
From: Chen Ridong <chenridong@...weicloud.com>
To: Waiman Long <llong@...hat.com>, tj@...nel.org, hannes@...xchg.org,
mkoutny@...e.com
Cc: cgroups@...r.kernel.org, linux-kernel@...r.kernel.org,
lujialin4@...wei.com, chenridong@...wei.com
Subject: Re: [PATCH cgroup/for-next 1/2] cpuset: fix failure to enable
isolated partition when containing isolcpus
On 2025/9/19 2:02, Waiman Long wrote:
> On 9/18/25 8:25 AM, Chen Ridong wrote:
>> From: Chen Ridong <chenridong@...wei.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@...wei.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
Powered by blists - more mailing lists