Hi, Michal

On Thu, 11 Dec 2025 11:59:27 +0100, Michal Koutný wrote:
>On Wed, Dec 10, 2025 at 06:11:08PM +0800, Sun Shaojie <[email protected]> 
>wrote:
>> Regardless of whether A1 through A5 belong to the same user or different
>> users, arbitration conflicts between sibling nodes can still occur (e.g.,
>> due to user misconfiguration). The key question is: when such a conflict
>> arises, should all sibling nodes be invalidated, or only the node that
>> triggered the conflict?
>
>Any serious [1] affinity users should watch for cpuset.cpus.partition
>already (since it can be invalidated by hotplug or IMO more probable
>ancestor re-configuration). Do you agree?
>
>Then I'd say it's reasonable to invalidate all (same reasoning -- it
>doesn't matter on the order in which siblings are configured, I consider
>local partitions). What would you see as the upsides of invalidating
>only the last offender (under the assumption above about watching)?

I agree that users should watch the state of their cpuset.cpus.partition.
Moreover, assuming the user is watching, there is no harm in invalidating
only the last conflicting partition.

For example

           root cgroup
                |
   --------------------------
   |      |     |    |      |    
   A      B    ...   M      N
 (root) (root) ... (root) (root)

Condition: Node N is the last one configured by the user.
           After its configuration, it conflicts with all previous nodes
           (A through M).

When all are invalidated, the user will notice that A-M are all invalidated
because they are watching. If the user wants to restore the exclusivity
of A-M, they need to reconfigure A-M once more, as well as N.

When only the last conflict is invalidated, the user will notice that N is
invalidated, and then they only need to reconfigure N.
This seems more convenient for the user.

However, whether watching is in place is not the key to this issue,
because watching merely reveals the outcome.

If A through N belong to different users, and when N conflicts with all of
A through M, then after the users of A-M observe the invalidation result
through watching, they cannot even restore their exclusive state, because
they will always conflict with N.

Thanks,
Sun Shaojie

Reply via email to