[CRIU] [PATCH] Skip root cgroup directories when restoring with manage-cgroup=full

Andrew Vagin avagin at odin.com
Tue Sep 1 03:38:12 PDT 2015


On Mon, Aug 31, 2015 at 08:14:55AM -0600, Tycho Andersen wrote:
> On Sun, Aug 30, 2015 at 03:36:03AM +0000, Hui Kang wrote:
> > Signed-off-by: Hui Kang <hkang.sunysb at gmail.com>
> > Signed-off-by: Andrew Vagin <avagin at openvz.org>
> > ---
> >  cgroup.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> > 
> > diff --git a/cgroup.c b/cgroup.c
> > index a4e0146..c0392a1 100644
> > --- a/cgroup.c
> > +++ b/cgroup.c
> > @@ -992,6 +992,9 @@ static int prepare_cgroup_dir_properties(char *path, int off, CgroupDirEntry **e
> >  		CgroupDirEntry *e = ents[i];
> >  		size_t off2 = off;
> >  
> > +		if (strcmp(e->dir_name, "") == 0 &&
> > +		    goto skip; /* skip root cgroups */
> > +
> 
> Shouldn't we only skip cpu and cpu and memory?

In many cases a process lives in a root cgroup when it doesn't use
this controller.

I don't know use-cases when we need to restore properties of root
cgroups.
> 
> Tycho
> _______________________________________________
> CRIU mailing list
> CRIU at openvz.org
> https://lists.openvz.org/mailman/listinfo/criu


More information about the CRIU mailing list