public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "William Hubbs" <williamh@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/openrc:master commit in: sh/, etc/
Date: Tue,  6 Oct 2015 21:34:07 +0000 (UTC)	[thread overview]
Message-ID: <1444161935.80d3928b0d13f09a9c1e82bd27c9fff943d84d43.williamh@OpenRC> (raw)

commit:     80d3928b0d13f09a9c1e82bd27c9fff943d84d43
Author:     Austin S. Hemmelgarn <ahferroin7 <AT> gmail <DOT> com>
AuthorDate: Tue Oct  6 20:02:28 2015 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Tue Oct  6 20:05:35 2015 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=80d3928b

cgroups: Add the hugetlb, net_cls and pids controllers

Note from WilliamH: I slightly rearranged the code and added the
settings in rc.conf.

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

 etc/rc.conf.Linux  | 9 +++++++++
 sh/rc-cgroup.sh.in | 9 +++++++++
 2 files changed, 18 insertions(+)

diff --git a/etc/rc.conf.Linux b/etc/rc.conf.Linux
index a8ad58b..f04f96e 100644
--- a/etc/rc.conf.Linux
+++ b/etc/rc.conf.Linux
@@ -62,12 +62,21 @@ rc_tty_number=12
 # Set the devices controller settings for this service.
 #rc_cgroup_devices=""
 
+# Set the hugetlb controller settings for this service.
+#rc_cgroup_hugetlb=""
+
 # Set the memory controller settings for this service.
 #rc_cgroup_memory=""
 
+# Set the net_cls controller settings for this service.
+#rc_cgroup_net_cls=""
+
 # Set the net_prio controller settings for this service.
 #rc_cgroup_net_prio=""
 
+# Set the pids controller settings for this service.
+#rc_cgroup_pids=""
+
 # Set this to YES if yu want all of the processes in a service's cgroup
 # killed when the service is stopped or restarted.
 # This should not be set globally because it kills all of the service's

diff --git a/sh/rc-cgroup.sh.in b/sh/rc-cgroup.sh.in
index 3f34d17..b49c711 100644
--- a/sh/rc-cgroup.sh.in
+++ b/sh/rc-cgroup.sh.in
@@ -109,12 +109,21 @@ cgroup_set_limits()
 	local devices="${rc_cgroup_devices:-$RC_CGROUP_DEVICES}"
 	[ -n "$devices" ] && cgroup_set_values devices "$devices"
 
+	local hugetlb="${rc_cgroup_hugetlb:-$RC_CGROUP_HUGETLB}"
+	[ -n "$hugetlb" ] && cgroup_set_values hugetlb "$hugetlb"
+
 	local memory="${rc_cgroup_memory:-$RC_CGROUP_MEMORY}"
 	[ -n "$memory" ] && cgroup_set_values memory "$memory"
 
+	local net_cls="${rc_cgroup_net_cls:-$RC_CGROUP_NET_CLS}"
+	[ -n "$net_cls" ] && cgroup_set_values net_cls "$net_cls"
+
 	local net_prio="${rc_cgroup_net_prio:-$RC_CGROUP_NET_PRIO}"
 	[ -n "$net_prio" ] && cgroup_set_values net_prio "$net_prio"
 
+	local pids="${rc_cgroup_pids:-$RC_CGROUP_PIDS}"
+	[ -n "$pids" ] && cgroup_set_values pids "$pids"
+
 	return 0
 }
 


             reply	other threads:[~2015-10-06 21:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 21:34 William Hubbs [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-09-15 18:31 [gentoo-commits] proj/openrc:master commit in: sh/, etc/ William Hubbs
2016-12-17 22:57 William Hubbs
2015-05-08 17:11 William Hubbs
2013-04-25 22:02 William Hubbs
2013-03-12 18:10 William Hubbs
2013-02-19 23:11 William Hubbs
2012-11-12 17:00 William Hubbs
2011-11-17 22:46 William Hubbs
2011-11-17 22:36 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=1444161935.80d3928b0d13f09a9c1e82bd27c9fff943d84d43.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