diff options
author | Tejun Heo <htejun@fb.com> | 2016-05-27 09:10:18 -0700 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-06-16 10:12:59 +0200 |
commit | 655e76df75ce4e5e0916388f23276fc88a607314 (patch) | |
tree | 21bc5433fef26c9ea242b8cff1fad2c58fba8cdd /src/core/cgroup.h | |
parent | 43d2b2215658e538a238415c89dce37897e3fd35 (diff) |
core: add cgroup memory controller support on the unified hierarchy (#3315)
On the unified hierarchy, memory controller implements three control knobs -
low, high and max which enables more useable and versatile control over memory
usage. This patch implements support for the three control knobs.
* MemoryLow, MemoryHigh and MemoryMax are added for memory.low, memory.high and
memory.max, respectively.
* As all absolute limits on the unified hierarchy use "max" for no limit, make
memory limit parse functions accept "max" in addition to "infinity" and
document "max" for the new knobs.
* Implement compatibility translation between MemoryMax and MemoryLimit.
v2:
- Fixed missing else's in config_parse_memory_limit().
- Fixed missing newline when writing out drop-ins.
- Coding style updates to use "val > 0" instead of "val".
- Minor updates to documentation.
Diffstat (limited to 'src/core/cgroup.h')
-rw-r--r-- | src/core/cgroup.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/cgroup.h b/src/core/cgroup.h index 2a9e7034a..68cb65007 100644 --- a/src/core/cgroup.h +++ b/src/core/cgroup.h @@ -95,6 +95,10 @@ struct CGroupContext { LIST_HEAD(CGroupIODeviceWeight, io_device_weights); LIST_HEAD(CGroupIODeviceLimit, io_device_limits); + uint64_t memory_low; + uint64_t memory_high; + uint64_t memory_max; + /* For legacy hierarchies */ uint64_t cpu_shares; uint64_t startup_cpu_shares; |