[CRIU] [PATCH 2/2] cgroups: Introduce cgroup management modes

Cyrill Gorcunov gorcunov at gmail.com
Tue Jun 2 08:50:33 PDT 2015


On Tue, Jun 02, 2015 at 06:33:34PM +0300, Pavel Emelyanov wrote:
> 
> > @@ -211,8 +211,22 @@ Restores previously checkpointed processes.
> >  *-r*, *--root* '<path>'::
> >      Change the root filesystem to <path> (when run in mount namespace).
> >  
> > -*--manage-cgroups*::
> > -    Restore cgroups configuration associated with a task from the image.
> > +*--manage-cgroups* [<mode>,<mode>]::
> > +     Restore cgroups configuration associated with a task from the image.
> > +     '<mode>' may be a combination of keywords from below.
> 
> CRIU can do two things with each cgroup -- create one and restore properties in.
> 
> > +    - *lazy*.     Require all controller roots to be created from image, and
> > +                  in case if some cgroup is already present the appropriate
> > +                  properties are zapped. This is default mode, same as setting
> > +                  up the option without arguments.
> 
> This is current behavior.
> 	if cgruop doesn't exist -- do both
> 	if cgroup does exists -- do none

yes

> > +    - *bindroot*. Require controller to exist before restore. This is useful
> > +                  if some other tool precreates cgroup roots for us.
> 
> This one looks like
> 	if cgroup doesn't exist -- fail
> 	if cgroup does exists -- do none

yes, but bindroot might be combined with props.

> 
> > +    - *props*.    If controller do not exist it will be cretaed from image,
> 
> s/cretaed/created/

thanks

> 
> > +                  otherwise reuse existing one. In case if cgroup exist
> > +                  properties are not zapped (as in *lazy* mode) but still
> > +                  restored from the image.
> 
> This is
> 	if cgroup doesn't exist -- do both
> 	if cgroup does exist -- do props restore
> 
> Right?

yes


More information about the CRIU mailing list