Re: [PATCHSET for-4.11] cgroup: implement cgroup v2 thread mode

From
Andy Lutomirski <hidden>
Date
2017-02-02 21:32:44
Also in
linux-api, lkml
Reply to
Tejun Heo, 2017-02-02
On Thu, Feb 2, 2017 at 12:06 PM, Tejun Heo [off-list ref] wrote:
Hello,

This patchset implements cgroup v2 thread mode.  It is largely based
on the discussions that we had at the plumbers last year.  Here's the
rough outline.
I like this, but I have some design questions:
* Thread mode is explicitly enabled on a cgroup by writing "enable"
  into "cgroup.threads" file.  The cgroup shouldn't have any child
  cgroups or enabled controllers.
Why do you need to manually turn it on?  That is, couldn't it be
automatic based on what controllers are enabled?
* Once enabled, arbitrary sub-hierarchy can be created and threads can
  be put anywhere in the subtree by writing TIDs into "cgroup.threads"
  file.  Process granularity and no-internal-process constraint don't
  apply in a threaded subtree.
I'm a bit worried that this conflates two different things.  There's
thread support, i.e. allowing individual threads to be placed into
cgroups.  There's also more flexible sub-hierarchy support, i.e.
relaxing no-internal-process constraints.  For the "cpuacct"
controller, for example, both of these make sense.  But what if
someone writes a controller (directio, for example, just to make
something up) for which thread granularity makes sense but relaxing
no-internal-process constraints does not?

--Andy
Thread (31 messages) 31 messages, 5 authors, last reply 2017-03-22
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help