core: add Condition[Memory/CPU/IO]Pressure
authorLuca Boccassi <luca.boccassi@microsoft.com>
Wed, 17 Nov 2021 10:00:12 +0000 (10:00 +0000)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 1 Dec 2021 08:53:18 +0000 (09:53 +0100)
commit81513b382b24a7f3602987f71042d075ca27d1a5
treef5e91164c685134f8ecaf7b175365b1b97a8c70f
parent99f8a6d7f58c9edb00b3d214b685987444dc3931
core: add Condition[Memory/CPU/IO]Pressure

By default checks PSI on /proc/pressure, and causes a unit to be skipped
if the threshold is above the given configuration for the avg300
measurement.
Also allow to pass a custom timespan, and a particular slice unit to
check under.

Fixes #20139
man/systemd.unit.xml
src/core/load-fragment-gperf.gperf.in
src/shared/condition.c
src/shared/condition.h
src/test/test-condition.c
test/fuzz/fuzz-unit-file/directives-all.service
test/fuzz/fuzz-unit-file/directives.service