diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-02-23 15:30:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-23 15:30:33 +0100 |
commit | e74bd83a8231653788b0caf54f3b4e845faf2262 (patch) | |
tree | d30ae3fb919108deac448d9c6f80be545895866b | |
parent | 3acf00a5a4ff656e2799f7f3e2544891b09bbc35 (diff) | |
parent | e7b3f1a6c358dd3eaf0b50547bd52130ad4126ae (diff) | |
download | systemd-e74bd83a8231653788b0caf54f3b4e845faf2262.tar.gz |
Merge pull request #18751 from anitazha/oomdconditions
units: add Conditions for systemd-oomd.service
-rw-r--r-- | README | 3 | ||||
-rw-r--r-- | units/systemd-oomd.service.in | 4 |
2 files changed, 7 insertions, 0 deletions
@@ -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 |