summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-08-31 12:28:54 +0200
committerGitHub <noreply@github.com>2016-08-31 12:28:54 +0200
commitcf08b48642cb78ca142e97fbbdb717043df77c0d (patch)
tree70659a34c9b7928fa894495078af49c96a3cd0ad /src/core/load-fragment.c
parent33eb97f626c82b5a665530c8aa1307cddbcde22d (diff)
parent96e131ea091f748780776b81b7163f8084ed8244 (diff)
core: introduce MemorySwapMax= (#3659)
Similar to MemoryMax=, MemorySwapMax= limits swap usage. This controls controls "memory.swap.max" attribute in unified cgroup.
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index d3fc3e36d9..8f067b5586 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -2990,8 +2990,12 @@ int config_parse_memory_limit(
c->memory_high = bytes;
else if (streq(lvalue, "MemoryMax"))
c->memory_max = bytes;
- else
+ else if (streq(lvalue, "MemorySwapMax"))
+ c->memory_swap_max = bytes;
+ else if (streq(lvalue, "MemoryLimit"))
c->memory_limit = bytes;
+ else
+ return -EINVAL;
return 0;
}