[CRIU] [PATCH 1/2] cgroups: Add ability to reuse precreated controllers and cgroups

Cyrill Gorcunov gorcunov at gmail.com
Fri May 22 06:01:05 PDT 2015


On Fri, May 22, 2015 at 03:37:56PM +0300, Pavel Emelyanov wrote:
> >>
> >> The current behavior is _not_ to fail if some cgroup exists, but to
> >> take it as is w/o modifying its parameters and populate with tasks.
> > 
> > No. current behaviour is to fail if some cgroup exist, so that's why
> > I assigned "strict" as default mode, ie when --manage-cgroup passed
> > it's the same as --manage-cgroup=strict
> 
> prepare_cgroup_dirs()
>                 if (fstatat(cg, paux, &st, 0) < 0) {
>                         ...
>                 } else {
>                         if (e->n_properties > 0) {
>                                 xfree(e->properties);
>                                 e->properties = NULL;
>                                 e->n_properties = 0;
>                         }
>                         pr_info("Determined dir %s already existed\n", paux);
>                 }
> 
> If directory already exists we just skip its options and go on.

That's subcgroups. Which I'm not sure how to propagate "strict" mode over
so I didn't change this code. That said the modes currently provided
are taking into account for toplevel cgroups only. Is it wrong?
(because it's early patches lets choose a strategy which fits best)


More information about the CRIU mailing list