[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cgmanager-devel
Subject:    [cgmanager-devel] [lxc/cgmanager] d497b0: Handle running on unified hierarchy
From:       GitHub <noreply () github ! com>
Date:       2015-07-02 15:40:20
Message-ID: 55955b6472644_6fa73fc5462c52b844190 () hookshot-fe5-cp1-prd ! iad ! github ! net ! mail
[Download RAW message or body]

Branch: refs/heads/master
  Home:   https://github.com/lxc/cgmanager
  Commit: d497b0d5bc1cc5e002bbc5aacaed1bdebd0eff76
      https://github.com/lxc/cgmanager/commit/d497b0d5bc1cc5e002bbc5aacaed1bdebd0eff76
  Author: Serge Hallyn <serge.hallyn@ubuntu.com>
  Date:   2015-07-02 (Thu, 02 Jul 2015)

  Changed paths:
    M cgmanager.c
    M fs.c
    M fs.h

  Log Message:
  -----------
  Handle running on unified hierarchy

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

Changelog: (July 1)  remove some debug statements

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>



[Attachment #3 (text/plain)]

_______________________________________________
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