summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorWaLyong Cho <walyong.cho@samsung.com>2016-07-04 07:03:54 +0000
committerWaLyong Cho <walyong.cho@samsung.com>2016-08-30 11:11:45 +0900
commit96e131ea091f748780776b81b7163f8084ed8244 (patch)
treec1a076e1e3b2fab8ed6c4a8eeb5fdc67a776569f /src/core/load-fragment.c
parent2551d797f36975e75761cb9c3974edd7986325a1 (diff)
core: introduce MemorySwapMax=
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 d5185cf6a0..65ca9d8a33 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -2981,8 +2981,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;
}