[prev in list] [next in list] [prev in thread] [next in thread]
List: cgmanager-devel
Subject: Re: [cgmanager-devel] [lxc-devel] [RFC PATCH 1/1] Handle running on unified hierarchy
From: Serge Hallyn <serge.hallyn () ubuntu ! com>
Date: 2015-06-30 20:03:53
Message-ID: 20150630200353.GC30358 () ubuntumail
[Download RAW message or body]
Quoting Stéphane Graber (stgraber@ubuntu.com):
> On Tue, Jun 16, 2015 at 02:34:57PM +0000, Serge Hallyn wrote:
> > The unified hierachy has some very different behavior from legacy hierachies.
> > Perhaps most intrusively, tasks may only exist in leaf nodes. To deal with
> > this, any Create request will create a cgroup with all controllers enabled
> > that were enabled in the parent, while MovePid will move a process into a
> > child of the requested cgroup with no enabled controllers, called ".cgm_leaf".
> >
> > We declare the current cgmanager API to be a legacy API which may sit on
> > top of either the legacy of unified hierarchy. A new v2 API, designed around
> > the unified hierarchy, will be introduced alongside the legacy API later.
> >
> > If unified hierarchy is mounted, recognize it as such. We also in that case pin
> > the controllers into the unified hierarchy (in a .cgpin directory), as we don't
> > want the mechanism for dealing with the controller to change mid-way.
> >
> > When calculating or showing a task's cgroup, drop the ".cgm_leaf" part.
> >
> > create: copy the parent's list of active controllers into the newly
> > created one. Otherwise the controllers cannot be used.
> >
> > update movepid to handle unified hierarchy. this involves:
> > creating the leafdir if it doesn't already exists
> > chowning the leafdir contents to match the parent dir contents
> > (don't enable any controllers in the leafdir)
> >
> > ignore error chowning tasks file, since it won't exist in unified hierarchy
> >
> > chown: also chown leaf dir if it exists
> >
> > handle leafdir in remove
> >
> > use NIH_MUST to avoid some null checks
> >
> > set_value: set cgm_leaf value as well as parent's
> >
> > Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
>
> Seems like a few debug statements have stuck around and show be dropped
> or reworked.
thanks, yeah and any nih_info which has no tab is meant to be removed.
One thing still to be done is to refuse any API calls from manually acting
on a cgroup called ".cgm_leaf".
Anyway, in theory this should not affect the normal functionality, so after
removing the bogus debugs I may push this to git. Unless someone has a
good suggestion that involves not using this patch at all.
-serge
_______________________________________________
cgmanager-devel mailing list
cgmanager-devel@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/cgmanager-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic