[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20251121103308.1661628-1-sunshaojie@kylinos.cn>
Date: Fri, 21 Nov 2025 18:33:08 +0800
From: Sun Shaojie <sunshaojie@...inos.cn>
To: chenridong@...weicloud.com
Cc: cgroups@...r.kernel.org,
hannes@...xchg.org,
linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org,
llong@...hat.com,
mkoutny@...e.com,
shuah@...nel.org,
sunshaojie@...inos.cn,
tj@...nel.org
Subject: Re: [PATCH v5] cpuset: Avoid invalidating sibling partitions on cpuset.cpus conflict.
Hi, Ridong,
Thu, 20 Nov 2025 21:25:12, Chen Ridong wrote:
>On 2025/11/20 21:07, Sun Shaojie wrote:
>> I don't understand the "order of operations" mentioned here. After reviewing
>> the previous email content, are you referring to this?
>>
>> On Sat, 15 Nov 2025 15:41:03, Chen Ridong wrote:
>>> With the result you expect, would we observe the following behaviors:
>>>
>>> #1> mkdir -p A1
>>> #2> mkdir -p B1
>>> #3> echo "0-1" > A1/cpuset.cpus
>>> #4> echo "1-2" > B1/cpuset.cpus
>>> #5> echo "root" > A1/cpuset.cpus.partition
>>> #6> echo "root" > B1/cpuset.cpus.partition # A1:root;B1:root invalid
>>>
>>> #1> mkdir -p A1
>>> #2> mkdir -p B1
>>> #3> echo "0-1" > A1/cpuset.cpus
>>> #4> echo "1-2" > B1/cpuset.cpus
>>> #5> echo "root" > B1/cpuset.cpus.partition
>>> #6> echo "root" > A1/cpuset.cpus.partition # A1:root invalid;B1:root
>>>
>>> Do different operation orders yield different results? If so, this is not what we expect.
>>
>> However, after applying this patch, the outcomes of these two examples are
>> as follows:
>>
>> #1> mkdir -p A1
>> #2> mkdir -p B1
>> #3> echo "0-1" > A1/cpuset.cpus | member | member |
>> #4> echo "1-2" > B1/cpuset.cpus | member | member |
>> #5> echo "root" > A1/cpuset.cpus.partition | root invalid | root |
>> #6> echo "root" > B1/cpuset.cpus.partition | root invalid | root invalid|
>>
>> #1> mkdir -p A1
>> #2> mkdir -p B1
>> #3> echo "0-1" > A1/cpuset.cpus | member | member |
>> #4> echo "1-2" > B1/cpuset.cpus | member | member |
>> #5> echo "root" > B1/cpuset.cpus.partition | root | root invalid|
>> #6> echo "root" > A1/cpuset.cpus.partition | root invalid | root invalid|
>>
>
>How about the following two sequences of operations:
>
>#1> mkdir -p A1
>#2> mkdir -p B1
>#3> echo "0-1" > A1/cpuset.cpus
>#4> echo "root" > A1/cpuset.cpus.partition
>#5> echo "1-2" > B1/cpuset.cpus
>#6> echo "root" > B1/cpuset.cpus.partition
>
>
>#1> mkdir -p A1
>#2> mkdir -p B1
>#5> echo "1-2" > B1/cpuset.cpus
>#6> echo "root" > B1/cpuset.cpus.partition
>#3> echo "0-1" > A1/cpuset.cpus
>#4> echo "root" > A1/cpuset.cpus.partition
>
>Will these two sequences yield the same result?
>As a key requirement: Regardless of the order in which we apply the configurations, identical final
>settings should always result in identical system states. We need to confirm if this holds true here.
Is this truly a key requirement? It appears this requirement wasn't met even
before applying my patch.
The example below, which does not use this patch, demonstrates how different
sequences with identical configurations can still lead to different system
states.
#1> mkdir -p A1
#2> mkdir -p B1 | A1's prstate | B1's prstate |
#3> echo "0-1" > A1/cpuset.cpus | member | member |
#4> echo "0-1" > A1/cpuset.cpus.exclusive | member | member |
#5> echo "root" > A1/cpuset.cpus.partition | root | member |
#6> echo "1-2" > B1/cpuset.cpus | root invalid | member |
#7> echo "2-3" > B1/cpuset.cpus.exclusive | root invalid | member |
#8> echo "root" > B1/cpuset.cpus.partition | root invalid | root |
#1> mkdir -p A1
#2> mkdir -p B1 | A1's prstate | B1's prstate |
#3> echo "0-1" > A1/cpuset.cpus | member | member |
#4> echo "0-1" > A1/cpuset.cpus.exclusive | member | member |
#5> echo "2-3" > B1/cpuset.cpus.exclusive | member | member |
#6> echo "root" > A1/cpuset.cpus.partition | root | member |
#7> echo "1-2" > B1/cpuset.cpus | root | member |
#8> echo "root" > B1/cpuset.cpus.partition | root | root |
Even without this patch, the result can still differ.
Thanks,
Sun Shaojie
Powered by blists - more mailing lists