Re: cgroups(7): documenting /sys/kernel/cgroup files

From: Roman Gushchin
Date: Wed Jan 10 2018 - 07:44:56 EST


Hello Michael,

On Wed, Jan 10, 2018 at 05:23:32AM +0100, Michael Kerrisk (man-pages) wrote:
> Hello Roman,
>
> On 8 January 2018 at 22:11, Michael Kerrisk (man-pages)
> <mtk.manpages@xxxxxxxxx> wrote:
> > Hello Roman,
> >
> > I wrote cgroups(7) text below to document the files added by you in
> > Linux 4.15. Could you let me know if the following text is okay please:
> >
> > /sys/kernel/cgroup files
> > /sys/kernel/cgroup/delegate (since Linux 4.15)
> > This file exports a list of the cgroups v2 files (one per
> > line) that are delegatable (i.e., whose ownership should be
> > changed to the user ID of the delegatee). In the future,
> > the set of delegatable files may change or grow, and this
> > file provides a way for the kernel to inform user-space
> > applications of which files must be delegated. As at Linux
> > 4.15, one sees the following when inspecting this file:
> >
> > $ cat /sys/kernel/cgroup/delegate
> > cgroup.procs
> > cgroup.subtree_control
>
> I have a question about /sys/kernel/cgroup/delegate: why does this
> file not list cgroup.threads, since that is also a file that
> (potentially) should be delegated?

cc Tejun

cgroup.threads is not listed because it's not delegatable (doesn't have
CFTYPE_NS_DELEGATABLE flag set). I don't know if it was intended or just
an accident (I believe the latter).

Thanks!

PS In the latter case the following patch should fix it: