dryang / rpms / systemd

Forked from rpms/systemd a year ago
Clone
2aacef
From b2d0c171a9ef84fb8ab8d8a428a8f51db37f58ea Mon Sep 17 00:00:00 2001
2aacef
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
2aacef
Date: Tue, 13 Dec 2022 15:25:55 +0100
2aacef
Subject: [PATCH] man: rework description of OOMPolicy= a bit
2aacef
2aacef
One had to read to the very end of the long description to notice that
2aacef
the setting is actually primarily intended for oomd. So let's mention oomd
2aacef
right at the beginning.
2aacef
2aacef
(cherry picked from commit 100d37d4f3111a97f51e37b51eea9243cb037b61)
2aacef
2aacef
Resolves: #2175619
2aacef
---
2aacef
 man/systemd.service.xml | 19 ++++++++++---------
2aacef
 1 file changed, 10 insertions(+), 9 deletions(-)
2aacef
2aacef
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
2aacef
index 8d8dd77689..cae520ceab 100644
2aacef
--- a/man/systemd.service.xml
2aacef
+++ b/man/systemd.service.xml
2aacef
@@ -1123,17 +1123,18 @@
2aacef
       <varlistentry>
2aacef
         <term><varname>OOMPolicy=</varname></term>
2aacef
 
2aacef
-        <listitem><para>Configure the out-of-memory (OOM) kernel killer policy. Note that the userspace OOM
2aacef
+        <listitem><para>Configure the out-of-memory (OOM) killing policy for the kernel and the userspace OOM
2aacef
         killer
2aacef
-        <citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
2aacef
-        is a more flexible solution that aims to prevent out-of-memory situations for the userspace, not just
2aacef
-        the kernel.</para>
2aacef
-
2aacef
-        <para>On Linux, when memory becomes scarce to the point that the kernel has trouble allocating memory
2aacef
-        for itself, it might decide to kill a running process in order to free up memory and reduce memory
2aacef
-        pressure. This setting takes one of <constant>continue</constant>, <constant>stop</constant> or
2aacef
+        <citerefentry><refentrytitle>systemd-oomd.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
2aacef
+        On Linux, when memory becomes scarce to the point that the kernel has trouble allocating memory for
2aacef
+        itself, it might decide to kill a running process in order to free up memory and reduce memory
2aacef
+        pressure. Note that <filename>systemd-oomd.service</filename> is a more flexible solution that aims
2aacef
+        to prevent out-of-memory situations for the userspace too, not just the kernel, by attempting to
2aacef
+        terminate services earlier, before the kernel would have to act.</para>
2aacef
+
2aacef
+        <para>This setting takes one of <constant>continue</constant>, <constant>stop</constant> or
2aacef
         <constant>kill</constant>. If set to <constant>continue</constant> and a process of the service is
2aacef
-        killed by the kernel's OOM killer this is logged but the service continues running. If set to
2aacef
+        killed by the OOM killer, this is logged but the service continues running. If set to
2aacef
         <constant>stop</constant> the event is logged but the service is terminated cleanly by the service
2aacef
         manager. If set to <constant>kill</constant> and one of the service's processes is killed by the OOM
2aacef
         killer the kernel is instructed to kill all remaining processes of the service too, by setting the