From bf600342afe0bf781a7be4bcb536cfa5dd69813f Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 5 Oct 2025 22:58:08 +0900 Subject: [PATCH 1/2] core/cgroup: fix indentation Addresses https://github.com/systemd/systemd/pull/38906#discussion_r2363292495. --- src/core/cgroup.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/core/cgroup.c b/src/core/cgroup.c index f6b0c5deea..ce9056ddaf 100644 --- a/src/core/cgroup.c +++ b/src/core/cgroup.c @@ -3033,22 +3033,22 @@ int unit_check_oom(Unit *u) { if (ctx->memory_oom_group) { r = cg_get_keyed_attribute( - "memory", - crt->cgroup_path, - "memory.events.local", - STRV_MAKE("oom_group_kill"), - &oom_kill); + "memory", + crt->cgroup_path, + "memory.events.local", + STRV_MAKE("oom_group_kill"), + &oom_kill); if (r < 0 && !IN_SET(r, -ENOENT, -ENXIO)) return log_unit_debug_errno(u, r, "Failed to read oom_group_kill field of memory.events.local cgroup attribute, ignoring: %m"); } if (isempty(oom_kill)) { r = cg_get_keyed_attribute( - "memory", - crt->cgroup_path, - "memory.events", - STRV_MAKE("oom_kill"), - &oom_kill); + "memory", + crt->cgroup_path, + "memory.events", + STRV_MAKE("oom_kill"), + &oom_kill); if (r < 0 && !IN_SET(r, -ENOENT, -ENXIO)) return log_unit_debug_errno(u, r, "Failed to read oom_kill field of memory.events cgroup attribute: %m"); } From 63b27d1765eb2dcefb79135b698605f35fefb446 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sun, 5 Oct 2025 23:09:27 +0900 Subject: [PATCH 2/2] man: mention about UINT64_MAX value for OOMKills and ManagedOOMKills DBus properties Follow-up for 9cf6ad16dd35a95af926f55ccfc9842311d485c3. Addresses https://github.com/systemd/systemd/pull/38906#discussion_r2363291116. --- man/org.freedesktop.systemd1.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/man/org.freedesktop.systemd1.xml b/man/org.freedesktop.systemd1.xml index 2b30adab9b..d4dec82c70 100644 --- a/man/org.freedesktop.systemd1.xml +++ b/man/org.freedesktop.systemd1.xml @@ -2696,10 +2696,13 @@ node /org/freedesktop/systemd1/unit/avahi_2ddaemon_2eservice { OOMPolicy=kill is enabled for the unit or not. If enabled, the property contains the number of times the kernel OOM killer killed all the processes in the unit's cgroup and its descendant cgroups. If disabled, the property contains the number of processes the kernel OOM killer - has killed in the unit's cgroup and its descendant cgroups. + has killed in the unit's cgroup and its descendant cgroups. When the corresponding cgroups have not + been realized, it reports 18446744073709551615 (2^64 - 1). ManagedOOMKills contains the number of times systemd-oomd - killed all the processes in the unit's cgroup and its descendant cgroups. + killed all the processes in the unit's cgroup and its descendant cgroups. When the corresponding + cgroups have not been realized yet, it reports 18446744073709551615 + (2^64 - 1).