Re: [PATCH -next] cpuset: treate root invalid trialcs as exclusive
From: Chen Ridong
Date: Mon Nov 17 2025 - 02:30:56 EST
On 2025/11/17 14:53, Sun Shaojie wrote:
> On 2025/11/15 14:23, Chen Ridong wrote:
>> On 2025/11/17 12:35, Sun Shaojie wrote:
>>> Hi, Ridong,
>>>
>>> Maybe, this patch does not apply to the following cases:
>>> Step
>>> #1> echo "root" > A1/cpuset.cpus.partition
>>> #1> echo "0-1" > B1/cpuset.cpus
>>> #2> echo "1-2" > A1/cpuset.cpus.exclusive -> return error
>>> It should return success here.
>>>
>>> Please consider the following modification.
>>>
>>
>> If A1 will automatically change to a valid partition, I think it should return error.
>
> Hi, Ridong,
>
> A1 will not automatically change to a valid partition.
>
> Perhaps this example is more intuitive.
>
> For example:
>
> Before apply this patch:
> #1> echo "0-1" > B1/cpuset.cpus
> #2> echo "root" > A1/cpuset.cpus.partition -> A1's prstate is "root invalid"
> #3> echo "1-2" > A1/cpuset.cpus.exclusive
> Return success, and A1's prstate is "root invalid"
>
I did not apply your patch to test my patch. here are the results I obtained:
# cd /sys/fs/cgroup/
# mkdir A1
# mkdir B1
# echo 0-1 > B1/cpuset.cpus
# echo root > A1/cpuset.cpus.partition
# cat A1/cpuset.cpus.partition
root invalid (cpuset.cpus and cpuset.cpus.exclusive are empty)
# echo 1-2 > A1/cpuset.cpus
# cat A1/cpuset.cpus.partition
root
This differs from the results you provided.
Never mind, let's focus on whether the rule should be relaxed in your patch. Once that's resolved, I
can resubmit my patch. Let's set this patch aside for now.
Thanks.
--
Best regards,
Ridong