From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.77) (envelope-from ) id 1Sm8lE-00075g-S9 for garchives@archives.gentoo.org; Tue, 03 Jul 2012 19:27:45 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E1DD9E0330; Tue, 3 Jul 2012 19:27:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AD8E1E0330 for ; Tue, 3 Jul 2012 19:27:37 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 209BB1B4060 for ; Tue, 3 Jul 2012 19:27:34 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id D75DBE5436 for ; Tue, 3 Jul 2012 19:27:32 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1341341398.3df0bd64cb8d520cb4e65b1ac307d0b9fa4e83c3.WilliamH@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: init.d/, etc/ X-VCS-Repository: proj/openrc X-VCS-Files: etc/rc.conf.Linux init.d/sysfs.in X-VCS-Directories: init.d/ etc/ X-VCS-Committer: WilliamH X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 3df0bd64cb8d520cb4e65b1ac307d0b9fa4e83c3 X-VCS-Branch: master Date: Tue, 3 Jul 2012 19:27:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: eefd2f75-abf7-46ff-b437-e6e071eb96ee X-Archives-Hash: 0d7160c9b3e2666f36d9ee8263979f69 commit: 3df0bd64cb8d520cb4e65b1ac307d0b9fa4e83c3 Author: William Hubbs gmail com> AuthorDate: Tue Jul 3 18:49:58 2012 +0000 Commit: William Hubbs gentoo org> CommitDate: Tue Jul 3 18:49:58 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D3df0bd64 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 klaftenegger.de X-Gentoo-Bug: 423317 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=3D423317 --- 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=3D12 + +# 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=3D"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() =20 mount_cgroups() { - yesno ${rc_cgroups:-YES} && [ -e /proc/cgroups ] && \ mountinfo -q /sys/fs/cgroup || return 0 =20 local agent=3D"@LIBEXECDIR@/sh/cgroup-release-agent.sh" @@ -83,6 +82,8 @@ mount_cgroups() -o none,nodev,noexec,nosuid,name=3Dopenrc,release_agent=3D"$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}