aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2018-02-26 14:33:15 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2018-02-26 14:33:15 -0600
commitc6047f887a362cb8d96624fbd73484ca703acf53 (patch)
treec63ac6401b58c02bf879c6b2b54f7d3f1871f49d /init.d
parent0506d68427e342366d826aae4bfbbc6cc0adecc2 (diff)
cgroups: add rc_cgroup_memory_use_hierarchy setting for cgroups v1
Diffstat (limited to 'init.d')
-rw-r--r--init.d/cgroups.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/init.d/cgroups.in b/init.d/cgroups.in
index 8ec91ef6..01f5dd48 100644
--- a/init.d/cgroups.in
+++ b/init.d/cgroups.in
@@ -57,6 +57,9 @@ cgroup1_controllers()
mkdir "/sys/fs/cgroup/${name}"
mount -n -t cgroup -o "${cgroup_opts},${name}" \
"${name}" "/sys/fs/cgroup/${name}"
+ yesno "${rc_cgroup_memory_use_hierarchy:-no}" &&
+ [ "${name}" = memory ] &&
+ echo 1 > /sys/fs/cgroup/memory/memory.use_hierarchy
;;
esac
done < /proc/cgroups