1. 23 Sep, 2013 6 commits
  2. 21 Sep, 2013 1 commit
  3. 20 Sep, 2013 1 commit
  4. 18 Sep, 2013 4 commits
  5. 16 Sep, 2013 4 commits
  6. 14 Sep, 2013 3 commits
  7. 13 Sep, 2013 2 commits
  8. 12 Sep, 2013 10 commits
  9. 11 Sep, 2013 6 commits
  10. 10 Sep, 2013 3 commits
    • cgroup: Major rewrite of cgroup logic · 33ad9f1a
      Christian Seiler authored
      This patch rewrites most of the cgroup logic. It creates a set of data
      structures to store the kernel state of the cgroup hierarchies and
      their mountpoints.
      
      Mainly, everything is now grouped with respect to the hierarchies of
      the system. Multiple controllers may be mounted together or separately
      to different hierarchies, the data structures reflect this.
      
      Each hierarchy may have multiple mount points (that were created
      previously using the bind mount method) and each of these mount points
      may point to a different prefix inside the cgroup tree. The current
      code does not make any assumptions regarding the mount points, it just
      parses /proc/self/mountinfo to acquire the relevant information.
      
      The only requirement is that the current cgroup of either init (if
      cgroup.pattern starts with '/' and the tools are executed as root) or
      the current process (otherwise) are accessible. The root cgroup need
      not be accessible.
      
      The configuration option cgroup.pattern is introduced. For
      root-executed containers, it specifies which format the cgroups should
      be in. Example values may include '/lxc/%n', 'lxc/%n', '%n' or
      '/machine/%n.lxc'. Any occurrence of '%n' is replaced with the name of
      the container (and if clashes occur in any hierarchy, -1, -2, etc. are
      appended globally). If the pattern starts with /, new containers'
      cgroups will be located relative to init's cgroup; if it doesn't, they
      will be located relative to the current process's cgroup.
      
      Some changes to the cgroup.h API have been done to make it more
      consistent, both with respect to naming and with respect to the
      parameters. This causes some changes in other parts of the code that
      are included in the patch.
      
      There has been some testing of this functionality, but there are
      probably still quite a few bugs in there, especially for people with
      different configurations.
      Signed-off-by: 's avatarChristian Seiler <christian@iwakd.de>
      Signed-off-by: 's avatarSerge Hallyn <serge.hallyn@ubuntu.com>