[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170203215600.GA13992@mtj.duckdns.org>
Date: Fri, 3 Feb 2017 16:56:00 -0500
From: Tejun Heo <tj@...nel.org>
To: Andy Lutomirski <luto@...capital.net>
Cc: Linux API <linux-api@...r.kernel.org>,
Li Zefan <lizefan@...wei.com>,
Johannes Weiner <hannes@...xchg.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Paul Turner <pjt@...gle.com>,
Mike Galbraith <efault@....de>,
"open list:CONTROL GROUP (CGROUP)" <cgroups@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
kernel-team@...com, lvenanci@...hat.com
Subject: Re: [PATCHSET for-4.11] cgroup: implement cgroup v2 thread mode
Hello,
On Fri, Feb 03, 2017 at 01:10:21PM -0800, Andy Lutomirski wrote:
> Is this flexible enough for the real-world usecases? For my use case
I can't think of a reason why it won't be. Capability-wise, nothing
is being lost by the interface.
> (if I actually ported over to this), it would mean that I'd have to
> enable thread mode on the root. What about letting a given process
> (actually mm, perhaps) live in a cgroup but let the threads be in
> different cgroups without any particular constraints. Then
> process-wide stuff would be accounted to the cgroup that owns the
> process.
I don't know. So, then, we basiclly have completely separate trees
for resource domains and threads. That exactly is what mounting cpu
controller separately does. It doesn't make sense to put them on the
same hierarchy. Why?
> > If a controller can't possibly define how internal competition should
> > be handled, which is unlikely - the problem is being consistent and
> > sensible, defining something isn't difficult - the controller can
> > simply error out those cases either on configuration or migration.
> > Again, I'm very doubtful we'll need that but if we ever need that
> > denying specific configurations is the best we can do anyway.
>
> I'm not sure I follow.
>
> I'm suggesting something quite simple: let controllers that don't need
> the no-internal-process constraints set a flag so that the constraints
> don't apply if all enabled controllers have the flag set.
Firstly, I think it's better to have the rules as simple and
consistent as possible as long as we don't sacrifice critical
capabilities.
Secondly, all the major resource controllers including cpu would
eventually need resource domain, so there is no real practical upside
to doing so.
Thirdly, if we commit to something like "controller X is not subject
to no-internal-process constraint", that commitment would prevent from
ever adding domain level operations to that controller without
breaking userland visible interface. All controllers do and have to
support process level operations. Some controllers can do thread
level operations. Keeping the latter opt-in doesn't block us from
adding thread mode later on. Doing it the other way around blocks us
from adding domain level operations later on.
Thanks.
--
tejun
Powered by blists - more mailing lists