daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
a4b143
From 8986b8ccd7ea39d75246b72f497a4131a278f3bb Mon Sep 17 00:00:00 2001
a4b143
From: Lennart Poettering <lennart@poettering.net>
a4b143
Date: Mon, 23 Sep 2013 16:02:31 -0500
a4b143
Subject: [PATCH] cgroup: always enable memory.use_hierarchy= for all cgroups
a4b143
 in the memory hierarchy
a4b143
a4b143
The non-hierarchial mode contradicts the whole idea of a cgroup tree so
a4b143
let's not support this. In the future the kernel will only support the
a4b143
hierarchial logic anyway.
a4b143
---
a4b143
 src/core/cgroup.c | 3 +++
a4b143
 1 file changed, 3 insertions(+)
a4b143
a4b143
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
a4b143
index 9277dd6..7f29afb 100644
a4b143
--- a/src/core/cgroup.c
a4b143
+++ b/src/core/cgroup.c
a4b143
@@ -678,6 +678,9 @@ int manager_setup_cgroup(Manager *m) {
a4b143
         /* 6. Figure out which controllers are supported */
a4b143
         m->cgroup_supported = cg_mask_supported();
a4b143
 
a4b143
+        /* 7.  Always enable hierarchial support if it exists... */
a4b143
+        cg_set_attribute("memory", "/", "memory.use_hierarchy", "1");
a4b143
+
a4b143
         return 0;
a4b143
 }
a4b143