[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yr4pgxUTmg+UN35F@mtj.duckdns.org>
Date: Fri, 1 Jul 2022 07:53:55 +0900
From: Tejun Heo <tj@...nel.org>
To: Michal Koutný <mkoutny@...e.com>
Cc: Waiman Long <longman@...hat.com>,
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>
Subject: Re: [PATCH v11 7/8] cgroup/cpuset: Update description of
cpuset.cpus.partition in cgroup-v2.rst
Hello,
On Thu, Jun 30, 2022 at 04:32:11PM +0200, Michal Koutný wrote:
> file owner
> parent/ user (mkdir)
> `- cpuset.cpus root
> `- cpuset.cpus.partition root (P)
> `- child_1/ user
> ` cpuset.cpus user (*)
> `- child_2/ user
> ` cpuset.cpus user (*)
>
> The writes to child cpuset.cpus may/may not invalidate parent's (P)
> partition validity (whether a cpu is left to it to host possible tasks).
> child_1 vs child_2 overlap affects only whether the children cgroups are
> a valid partition.
>
> I think you mean: writes to children cpuset.cpus should be allowed,
> possible exclusivity violation should be reported in
> parent/cpuset.cpus.partition.
I see.
> What I thought was OK: prevent (fail) writes to children cpuset.cpus
> that'd violate the exclusivity (or would take the last cpu from parent
> if it's necessary to host a task).
> IMO, it's similar to failed writes to parent/cgroup.subtree_control in a
> delegated subtree if the parent still has some tasks (that'd violate
> internal node constraint).
>
> What I think might still be OK: allow writes to children cpuset.cpus
> that violate exclusivity and report that in children's
> cpuset.cpus.partition. Writes that'd take last cpu from parent should
> still fail (similar to the failing subtree_control writes above).
Yeah, this one.
So, here, one important question is who owns cpuset.cpus.partition
file - is it a konb which is owned by the parent like other resource
control knobs including cpuset.cpus or is it a knob which is owned by
the cgroup itself for selecting its own operation like cgroup.procs or
cgroup.subtree_control.
In the former case, the parent being able to say that "my children
can't overlap" makes sense although I'm not a big fan of the current
interface (again, who owns that knob?). In the latter case, it doesn't
really make sense cuz it'd be declaring "I can't make my children
overlap" - well, then, don't.
Thanks.
--
tejun
Powered by blists - more mailing lists