[CRIU] [PATCH] cgroups: get controllers from /proc/self/cgroups (v2)

Andrey Vagin avagin at openvz.org
Fri Sep 11 11:41:15 PDT 2015


On Sep 11, 2015 18:46, "Cyrill Gorcunov" <gorcunov at gmail.com> wrote:
>
> On Fri, Sep 11, 2015 at 06:35:46PM +0300, Andrey Vagin wrote:
> > Some controllers can be disabled in kernel options. In this case they
> > are shown in /proc/cgroups, but they could not be mounted.
> >
> > All enabled controllers can be collected from /proc/self/cgroup.
> >
> > https://github.com/xemul/criu/issues/28
> >
> > v2: ',' is used to separate controllers
> >
> > Cc: Tycho Andersen <tycho.andersen at canonical.com>
> > Reported-by: Ross Boucher <boucher at gmail.com>
> > Signed-off-by: Andrey Vagin <avagin at openvz.org>
> >
>
> Could you please explain why can't you test the "active"
> field from /proc/cgroups and simply skip the controller
> if it's disabled?

There is the "enabled" field? Don't know, haven't heard;)

Seriously, the old version looks up a hierarchy for each controller.

In this version we get all controllers together, so the complexity of the
current version is O(n) instead of O(n^2)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvz.org/pipermail/criu/attachments/20150911/a68007a7/attachment.html>


More information about the CRIU mailing list