Skip to content

Commit c8aeb9d

Browse files
joshtriplettkeszybz
authored andcommitted
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.
1 parent ee6fd6a commit c8aeb9d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

man/file-hierarchy.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,25 @@
420420
this directory.</para></listitem>
421421
</varlistentry>
422422

423+
<varlistentry>
424+
<term><filename>/sys/fs/cgroup/</filename></term>
425+
<listitem><para>A virtual kernel file system exposing process
426+
control groups (cgroups). This file system is an API to interface
427+
with the kernel and not a place where normal files may be stored. On
428+
current systems running in the default "unified" mode,
429+
this directory serves as the mount point for the
430+
<literal>cgroup2</literal> filesystem, which provides a unified
431+
cgroup hierarchy for all resource controllers. On systems with
432+
non-default configurations, this directory may instead be a tmpfs
433+
filesystem containing mount points for various
434+
<literal>cgroup</literal> (v1) resource controllers; in such
435+
configurations, if <literal>cgroup2</literal> is mounted it will be
436+
mounted on <filename>/sys/fs/cgroup/unified/</filename>, but
437+
cgroup2 will not have resource controllers attached. In
438+
sandboxed/containerized setups, this directory may either not exist or
439+
may include a subset of functionality.
440+
</para></listitem>
441+
</varlistentry>
423442
</variablelist>
424443
</refsect1>
425444

0 commit comments

Comments
 (0)