summaryrefslogtreecommitdiff
path: root/man/systemd.unit.xml
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-22 22:09:38 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-23 01:11:18 +0100
commit8ebfd50aaf5503de0e77e7786095760030458e67 (patch)
tree6003d3d8635f3b81087f0fad0c09cccebd499ed0 /man/systemd.unit.xml
parent6c3f7ca036829825f344ffb364354faee5db174e (diff)
downloadsystemd-8ebfd50aaf5503de0e77e7786095760030458e67.tar.gz
shared/condition: add ConditionControlGroupController=v1|v2
Before, we only allowed conditionalizing on controllers, not the hierarchy. This commit extends this to allow a simple check for v1 (i.e. classic or hybrid), and v2 (full unified). An alternative approach would be to add a separate Condition for this, but I'm not too keen on that, considering that v1 is already being deprecrecated (c.f. 82f3063218).
Diffstat (limited to 'man/systemd.unit.xml')
-rw-r--r--man/systemd.unit.xml27
1 files changed, 19 insertions, 8 deletions
diff --git a/man/systemd.unit.xml b/man/systemd.unit.xml
index 333449097f..cd9437c509 100644
--- a/man/systemd.unit.xml
+++ b/man/systemd.unit.xml
@@ -1456,14 +1456,25 @@
<varlistentry>
<term><varname>ConditionControlGroupController=</varname></term>
- <listitem><para>Verify that the given cgroup controller (eg. <literal>cpu</literal>) is available
- for use on the system. For example, a particular controller may not be available if it was disabled
- on the kernel command line with <varname>cgroup_disable=controller</varname>. Multiple controllers
- may be passed with a space separating them; in this case the condition will only pass if all listed
- controllers are available for use. Controllers unknown to systemd are ignored. Valid controllers
- are <literal>cpu</literal>, <literal>cpuacct</literal>, <literal>io</literal>,
- <literal>blkio</literal>, <literal>memory</literal>, <literal>devices</literal>, and
- <literal>pids</literal>.</para>
+ <listitem><para>Check whether given cgroup controllers (eg. <literal>cpu</literal>) are available
+ for use on the system or whether the legacy v1 cgroup or the modern v2 cgroup hierarchy is used.
+ </para>
+
+ <para>Multiple controllers may be passed with a space separating them; in this case the condition
+ will only pass if all listed controllers are available for use. Controllers unknown to systemd are
+ ignored. Valid controllers are <literal>cpu</literal>, <literal>cpuacct</literal>,
+ <literal>io</literal>, <literal>blkio</literal>, <literal>memory</literal>,
+ <literal>devices</literal>, and <literal>pids</literal>. Even if available in the kernel, a
+ particular controller may not be available if it was disabled on the kernel command line with
+ <varname>cgroup_disable=controller</varname>.</para>
+
+ <para>Alternatively, two special strings <literal>v1</literal> and <literal>v2</literal> may be
+ specified (without any controller names). <literal>v2</literal> will pass if the unified v2 cgroup
+ hierachy is used, and <literal>v1</literal> will pass if the legacy v1 hierarchy or the hybrid
+ hierarchy are used (see the discussion of <varname>systemd.unified_cgroup_hierarchy</varname> and
+ <varname>systemd.legacy_systemd_cgroup_controller</varname> in
+ <citerefentry><refentrytitle>systemd.service</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ for more information).</para>
</listitem>
</varlistentry>