[lxc-devel] [PATCH 2/2] split cgroup handling into discrete backends

Dwight Engen dwight.engen at oracle.com
Thu Feb 6 14:48:45 UTC 2014


On Wed, 5 Feb 2014 23:34:16 -0600
Serge Hallyn <serge.hallyn at ubuntu.com> wrote:

> Quoting Serge Hallyn (serge.hallyn at ubuntu.com):
> > Quoting Dwight Engen (dwight.engen at oracle.com):
> > > - refactor cgroup into two backends, the classic cgfs driver and
> > > the new cgmanager. Instead of lxc_handler knowing about the
> > > internals of each, have it just store an opaque pointer to a
> > > struct that is private to each backend.
> > > 
> > > - rename a couple of cgroup functions for consistency: those that
> > > are considered an API (ie. exported by lxc.h) begin with lxc_ and
> > > those that are not are just cgroup_*
> > > 
> > > - made as many backend routines static as possible, only
> > > cg*_ops_init is exported
> > > 
> > > - made a nrtasks op which is needed by the utmp code for
> > > monitoring container shutdown, currently only implemented for the
> > > cgfs backend
> > 
> > Hi Dwight,
> > 
> > boy this diff got into some unfortunate strides (with near-identical
> > code being removed then inserted pages later) making it harder
> > to read than necessary :)
> > 
> > > Signed-off-by: Dwight Engen <dwight.engen at oracle.com>
> > 
> > Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>
> > 
> > (I'll apply after I run some tests)
> 
> Unfortunately, while containers started fine, lxc-attach and
> lxc-cgroup no longer seemed to work.  If it isn't obvious to
> you what the problem migth be, I'll look into it tomorrow.

Hmm, thats strange. I tested both of those with both backends. I'll try
to reproduce it here. I also tested the shutdown while frozen case and
at first I thought it was broken but then I realized that you just have
to wait for the timeout to occur (which is the same as it used to be).

> thanks,
> -serge
> _______________________________________________
> lxc-devel mailing list
> lxc-devel at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-devel



More information about the lxc-devel mailing list