[CRIU] [PATCH] cg: Don't walk cgroup tree when it's not required

Tycho Andersen tycho.andersen at canonical.com
Wed Jul 16 06:20:03 PDT 2014


On Wed, Jul 16, 2014 at 12:00:49PM +0400, Andrew Vagin wrote:
> On Tue, Jul 15, 2014 at 05:57:55PM +0400, Pavel Emelyanov wrote:
> > We have two bugs actually.
> > 
> > First, the check for 'item == root_item' in dump_task_cgroup fires
> > twice: first when we rite inventory (item == NULL as argument and
> > root_item == NULL because we haven't yet collected tasks) and the
> > 2nd time when we dump the root task itself.
> > 
> > The 2nd issue sits in dump_cgroups() -- if root_cgset == criu_cgset
> > we don't write cgroups information at all (checking that we don't
> > have them with list_is_singular() inside that if). That said, we
> > don't need to read the cgroups tree if we're not going to dump it.
> > 
> > This patch fixes both.
> 
> Acked-by: Andrew Vagin <avagin at parallels.com>

Acked-by: Tycho Andersen <tycho.andersen at canonical.com>


More information about the CRIU mailing list