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=423317
This commit is contained in:
parent
a5b4fab732
commit
3df0bd64cb
@ -18,3 +18,11 @@
|
|||||||
# This is the number of tty's used in most of the rc-scripts (like
|
# This is the number of tty's used in most of the rc-scripts (like
|
||||||
# consolefont, numlock, etc ...)
|
# consolefont, numlock, etc ...)
|
||||||
rc_tty_number=12
|
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"
|
||||||
|
@ -74,7 +74,6 @@ mount_misc()
|
|||||||
|
|
||||||
mount_cgroups()
|
mount_cgroups()
|
||||||
{
|
{
|
||||||
yesno ${rc_cgroups:-YES} && [ -e /proc/cgroups ] && \
|
|
||||||
mountinfo -q /sys/fs/cgroup || return 0
|
mountinfo -q /sys/fs/cgroup || return 0
|
||||||
|
|
||||||
local agent="@LIBEXECDIR@/sh/cgroup-release-agent.sh"
|
local agent="@LIBEXECDIR@/sh/cgroup-release-agent.sh"
|
||||||
@ -83,6 +82,8 @@ mount_cgroups()
|
|||||||
-o none,nodev,noexec,nosuid,name=openrc,release_agent="$agent" \
|
-o none,nodev,noexec,nosuid,name=openrc,release_agent="$agent" \
|
||||||
openrc /sys/fs/cgroup/openrc
|
openrc /sys/fs/cgroup/openrc
|
||||||
echo 1 > /sys/fs/cgroup/openrc/notify_on_release
|
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
|
while read name hier groups enabled rest; do
|
||||||
case "${enabled}" in
|
case "${enabled}" in
|
||||||
1) mkdir /sys/fs/cgroup/${name}
|
1) mkdir /sys/fs/cgroup/${name}
|
||||||
|
Loading…
Reference in New Issue
Block a user