From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:master commit in: init.d/, etc/
Date: Mon, 26 Feb 2018 20:34:21 +0000 (UTC) [thread overview]
Message-ID: <1519677195.c6047f887a362cb8d96624fbd73484ca703acf53.williamh@OpenRC> (raw)
commit: c6047f887a362cb8d96624fbd73484ca703acf53
Author: William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Mon Feb 26 20:33:15 2018 +0000
Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Mon Feb 26 20:33:15 2018 +0000
URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=c6047f88
cgroups: add rc_cgroup_memory_use_hierarchy setting for cgroups v1
etc/rc.conf | 5 +++++
init.d/cgroups.in | 3 +++
2 files changed, 8 insertions(+)
diff --git a/etc/rc.conf b/etc/rc.conf
index b7296d35..32c905d4 100644
--- a/etc/rc.conf
+++ b/etc/rc.conf
@@ -227,6 +227,11 @@ rc_tty_number=12
# /sys/fs/cgroup in hybrid or legacy mode.
#rc_controller_cgroups="YES"
+# The following setting turns on the memory.use_hierarchy setting in the
+# root memory cgroup for cgroups v1.
+# It must be set to yes in this file if you want this functionality.
+#rc_cggroup_memory_use_hierarchy="NO"
+
# The following settings allow you to set up values for the cgroups version 1
# controllers for your services.
# They can be set in this file;, however, if you do this, the settings
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
next reply other threads:[~2018-02-26 20:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-26 20:34 William Hubbs [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-07-03 19:27 [gentoo-commits] proj/openrc:master commit in: init.d/, etc/ William Hubbs
2011-12-20 7:22 William Hubbs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1519677195.c6047f887a362cb8d96624fbd73484ca703acf53.williamh@OpenRC \
--to=williamh@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox