lkml.org 
[lkml]   [2018]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: cgroups(7): documenting /sys/kernel/cgroup files
Hello, again.

On Wed, Jan 10, 2018 at 09:33:40AM -0800, Tejun Heo wrote:
> Hello, Michael.
>
> On Wed, Jan 10, 2018 at 06:31:20PM +0100, Michael Kerrisk (man-pages) wrote:
> > So, I am confused. According to Documentation/cgroup-v2.txt,
> > cgoup.threads is delegated:
> >
> > [[
> > Model of Delegation
> > ~~~~~~~~~~~~~~~~~~~
> >
> > A cgroup can be delegated in two ways. First, to a less privileged
> > user by granting write access of the directory and its "cgroup.procs",
> > "cgroup.threads" and "cgroup.subtree_control" files to the user.
> > Second, if the "nsdelegate" mount option is set, automatically to a
> > cgroup namespace on namespace creation.
> > ]]
> >
> > So, is that a mistake in that text file?
>
> Yes, it is. I probably copy&pasted from an earlier version where we
> were marking threaded domains instead of threaded roots. Will fix it
> right away.

Jesus christ, sorry. Roman and the document are right.

* cgroup.type is not delegatble, marking it threaded makes the cgroup
join the parent's domain.

* cgroup.threads is delegatable, because marking the child cgroups as
threaded make them join the subtree root, and the threads can be
dispersed across the parent - the delegated root here - and the
subtree of the child which is marked threaded.

I'll apply Roman's patch. Sorry about the confusion.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2018-01-14 23:21    [W:0.034 / U:1.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site