]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cgroup: Do not emit compat message without memory limit
authorMichal Koutný <mkoutny@suse.com>
Thu, 29 Sep 2022 11:34:21 +0000 (13:34 +0200)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 13 Jan 2023 01:48:03 +0000 (10:48 +0900)
Previously mere MemoryLow= directive would lead to emitting the compat
message 'Applying MemoryMax=18446744073709551615 as MemoryLimit=' even
though it carries little information.

src/core/cgroup.c

index e04b903d5c85273b1e009b535425bc1cfe9d8e12..7f3782ae4139afe45d842ebac23d7043381e9825 100644 (file)
@@ -1651,7 +1651,8 @@ static void cgroup_context_apply(
 
                         if (unit_has_unified_memory_config(u)) {
                                 val = c->memory_max;
-                                log_cgroup_compat(u, "Applying MemoryMax=%" PRIu64 " as MemoryLimit=", val);
+                                if (val != CGROUP_LIMIT_MAX)
+                                        log_cgroup_compat(u, "Applying MemoryMax=%" PRIu64 " as MemoryLimit=", val);
                         } else
                                 val = c->memory_limit;