summaryrefslogtreecommitdiffstats
path: root/catalog/systemd.catalog.in
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2023-02-10 16:44:24 +0100
committerLennart Poettering <lennart@poettering.net>2023-02-22 13:09:42 +0100
commit158fe190afe37b222c9dc2c53bd7be426b92ef89 (patch)
treee9f2a08d7fd364ede9213da53af8a5684c7e13a8 /catalog/systemd.catalog.in
parenthwdb: fix swapped buttons for Logitech Lift left (diff)
downloadsystemd-158fe190afe37b222c9dc2c53bd7be426b92ef89.tar.xz
systemd-158fe190afe37b222c9dc2c53bd7be426b92ef89.zip
sd-event: add high-level sd_event_add_memory_pressure() event source
Typically, in reasonably complex programs we want to realease various caches (such as glibc allocation caches) in case of memory pressure. Let's add explicit infrastructure for that to sd-event, that can hook Linux' Pressure Stall Information (PSI) logic with our event loop. This adds sd_event_add_memory_pressure() as easy, one-step API to install an even source that is called under memory pressure. The parameters which file to watch (the per-cgroup PSI file, or the system-wide file /proc/pressure/memory) can be configured via env vars. The idea is that the service manager sooner or later gains controls for setting this up correctly. Alternatively to the PSI a similar logic is supported but instead of waiting for POLLPRI on a procfs/cgroupfs fd we'll wait for POLLIN on FIFO or AF_UNIX sockets. This is useful for testing, and possibly in other environments, for example to hook up this protocol directly with GNOME's low memory monitor. By default this watches on the cgroup-local PSI so that we aren't affected by pressure on cgroups we are not related to.
Diffstat (limited to 'catalog/systemd.catalog.in')
-rw-r--r--catalog/systemd.catalog.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/catalog/systemd.catalog.in b/catalog/systemd.catalog.in
index 975e77fcec..82d4820b80 100644
--- a/catalog/systemd.catalog.in
+++ b/catalog/systemd.catalog.in
@@ -549,3 +549,18 @@ Whenever the system transitions to a new runtime phase, the specified PCR is
extended with a different string, to ensure that security policies for
TPM-bound secrets and other resources are limited to specific phases of the
runtime.
+
+-- f9b0be465ad540d0850ad32172d57c21
+Subject: Memory Trimmed
+Defined-By: systemd
+Support: %SUPPORT_URL%
+
+Memory of process @_PID@ (@_COMM@) has been trimmed.
+
+Either on user request or as result of a memory pressure event, memory of the
+process has been trimmed, returning unneded allocation caches and other
+resources back to the OS kernel, making them available for other components of
+the OS.
+
+@TRIMMED_BYTES@ of memory were returned to the OS, which took @TRIMMED_USEC@
+micro-seconds (µs).