diff options
author | Lennart Poettering <lennart@poettering.net> | 2023-03-09 12:34:23 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-03-09 22:31:20 +0100 |
commit | a617007417a09061a6f5f86b5751a080b3701b18 (patch) | |
tree | fe65b1c8e5dcadadbc6fb074633adbfb143fed98 /src/libsystemd | |
parent | 2208d9662313e90f4aa8d24f1573b8fbcd97120a (diff) | |
download | systemd-a617007417a09061a6f5f86b5751a080b3701b18.tar.gz |
mempress: change default PSI window duration to 2s
This changes the PSI window duration we default to for watching memory
pressure events from 1s to 2s. This is because apparently the kernel
will soon disallow window durations other than 2s for unprivileged
processes.
Hence, we'll bump the threshold from 100m to 200ms, and the window from
1s to 2s.
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/sd-event/sd-event.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 413ac16aa2..f11f35ef6e 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -2005,7 +2005,9 @@ _public_ int sd_event_add_memory_pressure( * some 100000 1000000 * full 100000 1000000 * - * We'll default to the middle level that both agree on */ + * We'll default to the middle level that both agree on. Except we do it on a 2s window + * (i.e. 200ms per 2s, rather than 100ms per 1s), because that's the window duration the + * kernel will allow us to do unprivileged, also in the future. */ if (asprintf((char**) &write_buffer, "%s " USEC_FMT " " USEC_FMT, MEMORY_PRESSURE_DEFAULT_TYPE, |