summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-23 15:30:33 +0100
committerGitHub <noreply@github.com>2021-02-23 15:30:33 +0100
commite74bd83a8231653788b0caf54f3b4e845faf2262 (patch)
treed30ae3fb919108deac448d9c6f80be545895866b
parent3acf00a5a4ff656e2799f7f3e2544891b09bbc35 (diff)
parente7b3f1a6c358dd3eaf0b50547bd52130ad4126ae (diff)
downloadsystemd-e74bd83a8231653788b0caf54f3b4e845faf2262.tar.gz
Merge pull request #18751 from anitazha/oomdconditions
units: add Conditions for systemd-oomd.service
-rw-r--r--README3
-rw-r--r--units/systemd-oomd.service.in4
2 files changed, 7 insertions, 0 deletions
diff --git a/README b/README
index bb0f126873..e0b7fbf8bf 100644
--- a/README
+++ b/README
@@ -126,6 +126,9 @@ REQUIREMENTS:
Required for systemd-nspawn:
CONFIG_DEVPTS_MULTIPLE_INSTANCES or Linux kernel >= 4.7
+ Required for systemd-oomd:
+ CONFIG_PSI
+
Note that kernel auditing is broken when used with systemd's
container code. When using systemd in conjunction with
containers, please make sure to either turn off auditing at
diff --git a/units/systemd-oomd.service.in b/units/systemd-oomd.service.in
index fd7c8d213d..f264a1bef0 100644
--- a/units/systemd-oomd.service.in
+++ b/units/systemd-oomd.service.in
@@ -13,6 +13,10 @@ Documentation=man:systemd-oomd.service(8)
DefaultDependencies=no
Before=multi-user.target shutdown.target
Conflicts=shutdown.target
+ConditionControlGroupController=v2
+ConditionPathExists=/proc/pressure/cpu
+ConditionPathExists=/proc/pressure/io
+ConditionPathExists=/proc/pressure/memory
[Service]
AmbientCapabilities=CAP_KILL CAP_DAC_OVERRIDE