[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32e27fcc-32f1-b26c-ae91-9e03f7e433af@redhat.com>
Date: Thu, 26 Aug 2021 23:01:30 -0400
From: Waiman Long <llong@...hat.com>
To: Tejun Heo <tj@...nel.org>
Cc: Zefan Li <lizefan.x@...edance.com>,
Johannes Weiner <hannes@...xchg.org>,
Jonathan Corbet <corbet@....net>,
Shuah Khan <shuah@...nel.org>, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kselftest@...r.kernel.org,
Andrew Morton <akpm@...ux-foundation.org>,
Roman Gushchin <guro@...com>, Phil Auld <pauld@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Frederic Weisbecker <frederic@...nel.org>,
Marcelo Tosatti <mtosatti@...hat.com>,
Michal Koutný <mkoutny@...e.com>
Subject: Re: [PATCH v7 5/6] cgroup/cpuset: Update description of
cpuset.cpus.partition in cgroup-v2.rst
On 8/26/21 1:35 PM, Tejun Heo wrote:
> Hello, Waiman.
>
> Let's stop iterating on the patchset until we reach a consensus.
>
> On Wed, Aug 25, 2021 at 05:37:49PM -0400, Waiman Long wrote:
>> 1) The "cpuset.cpus" is not empty and the list of CPUs are
>> exclusive, i.e. they are not shared by any of its siblings.
> Part of it can be reached by cpus going offline.
>
>> 2) The parent cgroup is a partition root.
> This condition can happen if a parent stop being a partition.
>
>> - 3) The "cpuset.cpus" is also a proper subset of the parent's
>> + 3) The "cpuset.cpus" is a subset of the parent's
>> "cpuset.cpus.effective".
> This can happen if cpus go offline.
>
>> 4) There is no child cgroups with cpuset enabled. This is for
>> eliminating corner cases that have to be handled if such a
>> condition is allowed.
> This may make sense as a short cut for us but doesn't really stem from
> interface or behavior requirements.
>
> Of the four conditions listed, two are bogus (the states can be
> reached through a different path and the configuration success or
> failure can be timing dependent if configuration racaes against cpu
> hotplug operations) and one maybe makes sense half-way and one is more
> of a shortcut.
>
> Can't we just replace these with transitions to invalid state with
> proper explanation? That'd get rid of the error handling duplications
> from both the kernel and user side, make automated configurations
> which may race against hot plug operations reliable, and consistently
> provide users with why something failed.
What I am doing here is setting a high bar for transitioning from member
to either "root" or "isolated". Once it becomes a partition, there are
multiple ways that can make it invalid. I am fine with that. However, I
am not sure it is a good idea to allow users to echo "root" to
cpuset.cpus.partition anywhere in the cgroup hierarchy and require them
to read it back to see if it succeed.
All the checking are done with cpuset_rwsem held. So there shouldn't be
any racing. Of course, a hotplug can immediately follow and make the
partition invalid.
Cheers,
Longman
Powered by blists - more mailing lists