[lxc-devel] [PATCH RFC] cgroups: use cgfs when possible
Serge Hallyn
serge.hallyn at ubuntu.com
Thu May 21 18:35:14 UTC 2015
Quoting Serge Hallyn (serge.hallyn at ubuntu.com):
> Because it is easier on the host. When creating many containers,
> reducing the load on the cgroup manager can greatly reduce the
> cpu usage. Until now, we have used cgmanager whenever we could.
> Now we use cgfs when we can, and switch to cgmanager if needed.
>
> At cgroup init, we first check whether we can use cgfs. If we
> can, we use it rather than cgmanager. This means that cgfs needs
> to actually check whether it can be used. We do this by making
> sure that every needed hierarchy has a writeable mountpoint.
>
> We also now need to have cgfs call cgmanager's mount_setup(), as
> any nested use of cgroups may well need to be using cgmanager.
>
> This requires a patch to the lxcfs mount hook to avoid failure
> on mkdir. (A better fix would be nice, but this suffices to make
> things work)
>
> This also gets rid of the cgroup_driver enum, which wasn't
> actually used anywhere.
>
> Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
Self-nack. Excuse the noise.
More information about the lxc-devel
mailing list