lkml.org 
[lkml]   [2018]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Cgroup v2 thread mode oddity: "domain invalid" cgroup with threaded controller enabled
From
Date
Hello Tejun,

A ping on the below...

Thanks,

Michael

On 10/04/2018 09:40 PM, Michael Kerrisk (man-pages) wrote:
> Hello Tejun,
>
> Suppose we have the following scenario:
>
> x [d] (pids)
> y [dt] (pids)
> p [t]
> q [t]
> r [t]
> z [d]
>
> Here, x/y is a "domain threaded root" with a threaded controller
> (the 'pids' controller) enabled. (In this scenario, there are no
> member processes in any of the cgroups.)
>
> Suppose we now convert x/z to "threaded" type:
>
> # echo threaded > x/z/cgroup.type
>
> Now we end up in the following state:
>
> x [dt] (pids)
> y [inv] (pids)
> p [t]
> q [t]
> r [t]
> z [t]
>
> This seems odd. x/y is now of "domain invalid" type with a controller
> enabled! This feels like a violation of the rules, since we can't
> in other circumstances do anything with a "domain invalid" cgroup
> except convert it to "threaded". In particular, we can't create
> child cgroups under a "domain invalid" cgroup, or add member processes
> to the cgroup, or *enable controllers in the cgroup*. In fact, when
> doing the
>
> # echo threaded > x/z/cgroup.type
>
> I had expected a write(2) error because the state of x/y should
> (I thought) not be permitted.
>
> Your thoughts?
>
> Thanks,
>
> Michael
>


--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

\
 
 \ /
  Last update: 2018-10-16 17:12    [W:0.049 / U:28.068 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site