summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a0f7080)
The non-hierarchial mode contradicts the whole idea of a cgroup tree so
let's not support this. In the future the kernel will only support the
hierarchial logic anyway.
}
if (mask & CGROUP_MEMORY) {
}
if (mask & CGROUP_MEMORY) {
- char buf[DECIMAL_STR_MAX(uint64_t) + 1];
if (c->memory_limit != (uint64_t) -1) {
if (c->memory_limit != (uint64_t) -1) {
+ char buf[DECIMAL_STR_MAX(uint64_t) + 1];
+
sprintf(buf, "%" PRIu64 "\n", c->memory_limit);
r = cg_set_attribute("memory", path, "memory.limit_in_bytes", buf);
} else
sprintf(buf, "%" PRIu64 "\n", c->memory_limit);
r = cg_set_attribute("memory", path, "memory.limit_in_bytes", buf);
} else
/* 6. Figure out which controllers are supported */
m->cgroup_supported = cg_mask_supported();
/* 6. Figure out which controllers are supported */
m->cgroup_supported = cg_mask_supported();
+ /* 7. Always enable hierarchial support if it exists... */
+ cg_set_attribute("memory", "/", "memory.use_hierarchy", "1");
+