summaryrefslogtreecommitdiffstats
path: root/man/file-hierarchy.xml
diff options
context:
space:
mode:
authorJosh Triplett <josh@joshtriplett.org>2022-02-25 21:40:45 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-03-01 08:34:08 +0100
commitc8aeb9d672fac7ac2d1e350431b7b4e734b90a5d (patch)
tree37154b1a1577177fa4b94efb5b413e33968c767e /man/file-hierarchy.xml
parentman: recommend built-in platform.freedesktop_os_release() in our page (diff)
downloadsystemd-c8aeb9d672fac7ac2d1e350431b7b4e734b90a5d.tar.xz
systemd-c8aeb9d672fac7ac2d1e350431b7b4e734b90a5d.zip
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.
Diffstat (limited to 'man/file-hierarchy.xml')
-rw-r--r--man/file-hierarchy.xml19
1 files changed, 19 insertions, 0 deletions
diff --git a/man/file-hierarchy.xml b/man/file-hierarchy.xml
index 3a24eca8ce..a6e3d75695 100644
--- a/man/file-hierarchy.xml
+++ b/man/file-hierarchy.xml
@@ -420,6 +420,25 @@
this directory.</para></listitem>
</varlistentry>
+ <varlistentry>
+ <term><filename>/sys/fs/cgroup/</filename></term>
+ <listitem><para>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
+ <literal>cgroup2</literal> 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
+ <literal>cgroup</literal> (v1) resource controllers; in such
+ configurations, if <literal>cgroup2</literal> is mounted it will be
+ mounted on <filename>/sys/fs/cgroup/unified/</filename>, 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.
+ </para></listitem>
+ </varlistentry>
</variablelist>
</refsect1>