From be5412d85493615bc2b027bd7131497e31725190 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 3 Sep 2012 18:54:32 -0700 Subject: [PATCH] main: jointly mount more controllers After talking to the cgroup kernel folks at LPC we came to the conclusion that it is probably a good idea to mount all CPU related resp. all network related cgroup controllers together, both because they are good defaults for admins and because this might prepare for eventual kernel cleanups where the ability to mount them separately is removed. --- man/systemd.conf.xml | 2 +- src/core/main.c | 7 ++++--- src/core/system.conf | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/man/systemd.conf.xml b/man/systemd.conf.xml index 7dc5cc13c..a550c2c71 100644 --- a/man/systemd.conf.xml +++ b/man/systemd.conf.xml @@ -118,7 +118,7 @@ - JoinControllers=cpu,cpuacct + JoinControllers=cpu,cpuacct,cpuset net_cls,netprio Configures controllers that shall be mounted in a single diff --git a/src/core/main.c b/src/core/main.c index 12af3cdd2..7b5c86161 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1305,12 +1305,13 @@ int main(int argc, char *argv[]) { } /* By default, mount "cpu" and "cpuacct" together */ - arg_join_controllers = new(char**, 2); + arg_join_controllers = new(char**, 3); if (!arg_join_controllers) goto finish; - arg_join_controllers[0] = strv_new("cpu", "cpuacct", NULL); - arg_join_controllers[1] = NULL; + arg_join_controllers[0] = strv_new("cpu", "cpuacct", "cpuset", NULL); + arg_join_controllers[1] = strv_new("net_cls", "netprio", NULL); + arg_join_controllers[2] = NULL; if (!arg_join_controllers[0]) goto finish; diff --git a/src/core/system.conf b/src/core/system.conf index d5208186a..3989c2e0c 100644 --- a/src/core/system.conf +++ b/src/core/system.conf @@ -20,7 +20,7 @@ #DefaultControllers=cpu #DefaultStandardOutput=journal #DefaultStandardError=inherit -#JoinControllers=cpu,cpuacct +#JoinControllers=cpu,cpuacct,cpuset net_cls,netprio #RuntimeWatchdogSec=0 #ShutdownWatchdogSec=10min #CapabilityBoundingSet= -- 2.30.2