public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/openrc:master commit in: init.d/, etc/
@ 2011-12-20  7:22 William Hubbs
  0 siblings, 0 replies; 3+ messages in thread
From: William Hubbs @ 2011-12-20  7:22 UTC (permalink / raw
  To: gentoo-commits

commit:     3e2001f6a2f6d49f452b8d5b009c7190b7839524
Author:     Piotr Karbowski <piotr.karbowski <AT> gmail <DOT> com>
AuthorDate: Sat Dec 17 16:45:11 2011 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Dec 20 07:14:08 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=3e2001f6

add rc_cgroup option to allow disabling of cgroup default setup

Currently, cgroups are still in development, so we are not setting them
up by default. However, this default will be changed in the future.

This commit message and patch were updated by
William Hubbs <williamh <AT> gentoo.org>.

X-Gentoo-Bug: 395079
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=395079

---
 etc/rc.conf.Linux |    6 ++++++
 init.d/sysfs.in   |    1 +
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/etc/rc.conf.Linux b/etc/rc.conf.Linux
index 9b5859a..e149a2c 100644
--- a/etc/rc.conf.Linux
+++ b/etc/rc.conf.Linux
@@ -22,3 +22,9 @@ rc_sys="@RC_SYS_DEFAULT@"
 # consolefont, numlock, etc ...)
 rc_tty_number=12
 
+# openrc can set up linux control groups the way the documentation in
+# the kernel recommends creating them.
+# Currently, this option is disabled by default, but it will be enabled
+# in the future, so if you would like to see how control groups will be
+# created, uncomment this line.
+#rc_cgroups="YES"

diff --git a/init.d/sysfs.in b/init.d/sysfs.in
index 8838213..a709e5d 100644
--- a/init.d/sysfs.in
+++ b/init.d/sysfs.in
@@ -64,6 +64,7 @@ mount_misc()
 
 mount_cgroups()
 {
+	yesno ${rc_cgroups:-NO} || return 0
 	if [ ! -e /proc/cgroups ]; then
 		return 0
 	fi



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, etc/
@ 2012-07-03 19:27 William Hubbs
  0 siblings, 0 replies; 3+ messages in thread
From: William Hubbs @ 2012-07-03 19:27 UTC (permalink / raw
  To: gentoo-commits

commit:     3df0bd64cb8d520cb4e65b1ac307d0b9fa4e83c3
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Tue Jul  3 18:49:58 2012 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Jul  3 18:49:58 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=3df0bd64

cgroups: allow users to turn off creation of controller cgroups

This adds a switch to not create the one-cgroup-per-controller setup of
cgroups.

reported-by: davidweb <AT> klaftenegger.de
X-Gentoo-Bug: 423317
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=423317

---
 etc/rc.conf.Linux |    8 ++++++++
 init.d/sysfs.in   |    3 ++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/etc/rc.conf.Linux b/etc/rc.conf.Linux
index ee23bc3..6cc9bef 100644
--- a/etc/rc.conf.Linux
+++ b/etc/rc.conf.Linux
@@ -18,3 +18,11 @@
 # This is the number of tty's used in most of the rc-scripts (like
 # consolefont, numlock, etc ...)
 rc_tty_number=12
+
+# If you have cgroups turned on in your kernel, this switch controls
+# whether or not a group for each controler is mounted under
+# /sys/fs/cgroup.
+# Support for process management by cgroups is planned in the future,
+# so if you turn this off, be aware that you may not be able to use that
+# feature.
+#rc_controller_cgroups="YES"

diff --git a/init.d/sysfs.in b/init.d/sysfs.in
index e856775..5bc5c71 100644
--- a/init.d/sysfs.in
+++ b/init.d/sysfs.in
@@ -74,7 +74,6 @@ mount_misc()
 
 mount_cgroups()
 {
-	yesno ${rc_cgroups:-YES} && [ -e /proc/cgroups ] && \
 		mountinfo -q /sys/fs/cgroup || return 0
 
 	local agent="@LIBEXECDIR@/sh/cgroup-release-agent.sh"
@@ -83,6 +82,8 @@ mount_cgroups()
 		-o none,nodev,noexec,nosuid,name=openrc,release_agent="$agent" \
 		openrc /sys/fs/cgroup/openrc
 	echo 1 > /sys/fs/cgroup/openrc/notify_on_release
+
+	yesno ${rc_controller_cgroups:-YES} && [ -e /proc/cgroups ] || return 0
 	while read name hier groups enabled rest; do
 		case "${enabled}" in
 			1)	mkdir /sys/fs/cgroup/${name}



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [gentoo-commits] proj/openrc:master commit in: init.d/, etc/
@ 2018-02-26 20:34 William Hubbs
  0 siblings, 0 replies; 3+ messages in thread
From: William Hubbs @ 2018-02-26 20:34 UTC (permalink / raw
  To: gentoo-commits

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-26 20:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-26 20:34 [gentoo-commits] proj/openrc:master commit in: init.d/, etc/ William Hubbs
  -- strict thread matches above, loose matches on Subject: below --
2012-07-03 19:27 William Hubbs
2011-12-20  7:22 William Hubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox