From c8aeb9d672fac7ac2d1e350431b7b4e734b90a5d Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Fri, 25 Feb 2022 12:40:45 -0800 Subject: [PATCH] file-hierarchy: Document /sys/fs/cgroup file-hierarchy does not mention anything about the expected mountpoint for cgroups. This may lead some software to believe it will need to search for it (e.g. by scanning mountinfo) rather than just looking in the canonical location. Document the canonical mountpoint as /sys/fs/cgroup. Also provide information on the non-default configurations, but make it clear that in such configurations if cgroup2 is mounted (hybrid mode) it won't have resource controllers attached. This will help software know if it should fall back to /sys/fs/cgroup/unified or just ignore that case. --- man/file-hierarchy.xml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/man/file-hierarchy.xml b/man/file-hierarchy.xml index 3a24eca8cea..a6e3d75695a 100644 --- a/man/file-hierarchy.xml +++ b/man/file-hierarchy.xml @@ -420,6 +420,25 @@ this directory. + + /sys/fs/cgroup/ + A virtual kernel file system exposing process + control groups (cgroups). This file system is an API to interface + with the kernel and not a place where normal files may be stored. On + current systems running in the default "unified" mode, + this directory serves as the mount point for the + cgroup2 filesystem, which provides a unified + cgroup hierarchy for all resource controllers. On systems with + non-default configurations, this directory may instead be a tmpfs + filesystem containing mount points for various + cgroup (v1) resource controllers; in such + configurations, if cgroup2 is mounted it will be + mounted on /sys/fs/cgroup/unified/, but + cgroup2 will not have resource controllers attached. In + sandboxed/containerized setups, this directory may either not exist or + may include a subset of functionality. + +