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

Pavel Emelyanov xemul at parallels.com
Tue Jun 2 08:33:34 PDT 2015


> @@ -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

> +    - *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

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

s/cretaed/created/

> +                  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?

-- Pavel


More information about the CRIU mailing list