Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1672072 > unrolled thread

Re: [RFC PATCH-cgroup 4/6] cgroup: Introduce subtree root mode

Started byTejun Heo <tj@kernel.org>
First post2017-06-21 23:40 +0200
Last post2017-06-22 22:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC PATCH-cgroup 4/6] cgroup: Introduce subtree root mode Tejun Heo <tj@kernel.org> - 2017-06-21 23:40 +0200
    Re: [RFC PATCH-cgroup 4/6] cgroup: Introduce subtree root mode Waiman Long <longman@redhat.com> - 2017-06-22 22:30 +0200

#1672072 — Re: [RFC PATCH-cgroup 4/6] cgroup: Introduce subtree root mode

FromTejun Heo <tj@kernel.org>
Date2017-06-21 23:40 +0200
SubjectRe: [RFC PATCH-cgroup 4/6] cgroup: Introduce subtree root mode
Message-ID<tUVvX-3sm-17@gated-at.bofh.it>
Hello, Waiman.

On Wed, Jun 14, 2017 at 11:05:35AM -0400, Waiman Long wrote:
> Subtree root mode is a new cgroup mode which applies the following
> restrictions when turned on:
> 
>  1) Controllers are only allowed to be passed to the children in
>     bypass mode except those with the "enable_on_root" flag on.
>  2) Only 1 child cgroup is allowed.
> 
> That lone child can be used as the pseudo root of a container cgroup
> hierarchy.  All the resources, if controlled, are in the parent
> cgroup. There will be no control knobs in the child. That makes it
> look and feel like a root.

I'm not sure not having the control files in the child makes that much
difference.

> That pseudo root is also considered to be mixable and so can become
> root of a mixed threaded subtree. The no internal process constraint
> also does not apply.

Heh, you can't just declare a non-root cgroup to be a mixed root but
if you're special casing this and making the kernel play a masquerade
with special node, you can make cgroup provide a mixed root while
hosting the internal processes in a dedicated leaf cgroup which isn't
visible to the nested root, right?

It's all a game of masquerading tho and doesn't actually enable
anything which isn't possible now.  This would definitely be useful
for testing.

Thanks.

-- 
tejun

[toc] | [next] | [standalone]


#1673031

FromWaiman Long <longman@redhat.com>
Date2017-06-22 22:30 +0200
Message-ID<tVgTL-15s-13@gated-at.bofh.it>
In reply to#1672072
On 06/21/2017 05:38 PM, Tejun Heo wrote:
> Hello, Waiman.
>
> On Wed, Jun 14, 2017 at 11:05:35AM -0400, Waiman Long wrote:
>> Subtree root mode is a new cgroup mode which applies the following
>> restrictions when turned on:
>>
>>  1) Controllers are only allowed to be passed to the children in
>>     bypass mode except those with the "enable_on_root" flag on.
>>  2) Only 1 child cgroup is allowed.
>>
>> That lone child can be used as the pseudo root of a container cgroup
>> hierarchy.  All the resources, if controlled, are in the parent
>> cgroup. There will be no control knobs in the child. That makes it
>> look and feel like a root.
> I'm not sure not having the control files in the child makes that much
> difference.

It is more a look and feel thing than being useful. The sole purpose is
to make the container root looks like a real root as much as possible.

>> That pseudo root is also considered to be mixable and so can become
>> root of a mixed threaded subtree. The no internal process constraint
>> also does not apply.
> Heh, you can't just declare a non-root cgroup to be a mixed root but
> if you're special casing this and making the kernel play a masquerade
> with special node, you can make cgroup provide a mixed root while
> hosting the internal processes in a dedicated leaf cgroup which isn't
> visible to the nested root, right?

That is true.

> It's all a game of masquerading tho and doesn't actually enable
> anything which isn't possible now.  This would definitely be useful
> for testing.
You are right about that. As mentioned in another email, having bypass
mode in subtree_control is useful, I think. The concept of subtree root
mode, however, is more toward satisfying PeterZ's idea of container
invariant. I won't mind leaving it out if others have no objection to that.

Cheers,
Longman

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web