[Devel] [PATCH rh7] cgroup: do not virtualize output of cgroup_path
Cyrill Gorcunov
gorcunov at virtuozzo.com
Mon Aug 24 05:02:11 PDT 2015
On Mon, Aug 24, 2015 at 02:58:07PM +0300, Vladimir Davydov wrote:
>
> As you wish.
Thank you!
> ---
> From: Vladimir Davydov <vdavydov at parallels.com>
> Subject: [PATCH rh7] cgroup: do not virtualize output of cgroup_path
>
> When cgroup_path() is called from inside a container, its output is
> "virtualized", i.e. cgroup /CTID/A/B is reported as /A/B. This was done
> for userspace tools to not get confused by the output of some proc files
> (namely, /proc/PID/{cgroup,cpuset}). However, it is wrong to virtualize
> cgroup_path() anytime it is called by a container. For instance, it is
> called from inside a container on OOM in order to dump memcg info to
> system log, in which case mangling its output would be incorrect.
>
> Therefore this patch makes cgroup_path() always return an absolute path.
> To get a container-relative path, one should now use cgroup_path_ve().
> Currently, cgroup_path_ve() is only used for /proc files output (it
> seems to be enough for now).
>
> https://jira.sw.ru/browse/PSBM-34852
>
> Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
Acked-by: Cyrill Gorcunov <gorcunov at openvz.org>
More information about the Devel
mailing list