On 2025/11/13 11:33, Sun Shaojie wrote:
> On 2025/11/13 09:21, Chen Ridong wrote:
>>
>> Hi, Longman.
>>
>> It did not fail to set cupset.cpus, but invalidated the sibling cpuset 
>> partition.
>>
>> If we relax this rule, we should consider:
>>
>>  What I want to note is this: what if we run echo root > 
>> /sys/fs/cgroup/B1/cpuset.cpus.partition
>> after step #5? There’s no conflict check when enabling the partition.
>>
>> -- 
>> Best regards,
>> Ridong
> 
> Hi, Ridong.
> 
> I understand your concern, and there is a conflict check when enabling 
> partitions. Below, I will use two tables to show the partition states of A1
> and B1 before applying this patch and after applying it.(All the steps in 
> the table are by default under the path /sys/fs/cgroup)
> 
> Table 1: Before applying the patch
>                                             | A1's prstate | B1's prstate |
>  #1> mkdir -p A1                            | member       |              |
>  #2> echo "0-1" > A1/cpuset.cpus            | member       |              |
>  #3> echo "root" > A1/cpuset.cpus.partition | root         |              |
>  #4> mkdir -p B1                            | root         | member       |
>  #5> echo "0-3" > B1/cpuset.cpus            | root invalid | member       |
>  #6> echo "root" > B1/cpuset.cpus.partition | root invalid | root invalid |
> 
> Table 2: After applying the patch
>                                             | A1's prstate | B1's prstate |
>  #1> mkdir -p A1                            | member       |              |
>  #2> echo "0-1" > A1/cpuset.cpus            | member       |              |
>  #3> echo "root" > A1/cpuset.cpus.partition | root         |              |
>  #4> mkdir -p B1                            | root         | member       |
>  #5> echo "0-3" > B1/cpuset.cpus            | root         | member       |
>  #6> echo "root" > B1/cpuset.cpus.partition | root         | root invalid |
> 

Thank you for your clarification.

I missed exclusive conflict will be checked with:

update_prstate
update_partition_exclusive_flag
cpuset_update_flag
validate_change

-- 
Best regards,
Ridong


Reply via email to