core/cgroup: introduce MemoryZSwapWriteback setting
Added in https://github.com/torvalds/linux/commit/501a06fe8e4c185bbda371b8cedbdf1b23a633d8
This commit is contained in:
@@ -230,6 +230,10 @@ static int exec_cgroup_context_serialize(const CGroupContext *c, FILE *f) {
|
||||
return r;
|
||||
}
|
||||
|
||||
r = serialize_bool(f, "exec-cgroup-context-memory-zswap-writeback", c->memory_zswap_writeback);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
if (c->memory_limit != CGROUP_LIMIT_MAX) {
|
||||
r = serialize_item_format(f, "exec-cgroup-context-memory-limit", "%" PRIu64, c->memory_limit);
|
||||
if (r < 0)
|
||||
@@ -677,6 +681,11 @@ static int exec_cgroup_context_deserialize(CGroupContext *c, FILE *f) {
|
||||
r = safe_atou64(val, &c->startup_memory_zswap_max);
|
||||
if (r < 0)
|
||||
return r;
|
||||
} else if ((val = startswith(l, "exec-cgroup-context-memory-zswap-writeback="))) {
|
||||
r = parse_boolean(val);
|
||||
if (r < 0)
|
||||
return r;
|
||||
c->memory_zswap_writeback = r;
|
||||
} else if ((val = startswith(l, "exec-cgroup-context-memory-limit="))) {
|
||||
r = safe_atou64(val, &c->memory_limit);
|
||||
if (r < 0)
|
||||
|
||||
Reference in New Issue
Block a user