summaryrefslogtreecommitdiffstats
path: root/src/core/cgroup.c
diff options
context:
space:
mode:
authorChris Down <chris@chrisdown.name>2019-09-30 19:25:09 +0200
committerChris Down <chris@chrisdown.name>2019-09-30 19:41:21 +0200
commit64fe532e90b3e99bf7821ded8a1107c239099e40 (patch)
tree3336e2295c2f5925a35d70926e7a60ea08dc9f22 /src/core/cgroup.c
parentcgroup: Check ancestor memory min for unified memory config (diff)
downloadsystemd-64fe532e90b3e99bf7821ded8a1107c239099e40.tar.xz
systemd-64fe532e90b3e99bf7821ded8a1107c239099e40.zip
cgroup: Respect DefaultMemoryMin when setting memory.min
This is an oversight from https://github.com/systemd/systemd/pull/12332. Sadly the tests didn't catch it since it requires a real cgroup hierarchy to see, and it wasn't seen in prod since we're only currently using DefaultMemoryLow, not DefaultMemoryMin. :-(
Diffstat (limited to '')
-rw-r--r--src/core/cgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index bcf06b0e60..74579a0a19 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -1227,7 +1227,7 @@ static void cgroup_context_apply(
log_cgroup_compat(u, "Applying MemoryLimit=%" PRIu64 " as MemoryMax=", max);
}
- cgroup_apply_unified_memory_limit(u, "memory.min", c->memory_min);
+ cgroup_apply_unified_memory_limit(u, "memory.min", unit_get_ancestor_memory_min(u));
cgroup_apply_unified_memory_limit(u, "memory.low", unit_get_ancestor_memory_low(u));
cgroup_apply_unified_memory_limit(u, "memory.high", c->memory_high);
cgroup_apply_unified_memory_limit(u, "memory.max", max);