Hi, would you consider the following fix? This has been reported against an older version of the package but the issue is still present in upstream. Just try: CREATE_DEFAULT=yes and configure sysdefault cgroup via /etc/cgconfig.conf group /sysdefault { cpuset { cpuset.cpus = 0; cpuset.mems = 0; } }
This configuration will get overwritten by /etc/init.d/cgconfig start --- >From 1f56fee18da3d7b1039eea10cc5f6a01026f089b Mon Sep 17 00:00:00 2001 From: Michal Hocko <mho...@suse.cz> Date: Mon, 12 Jan 2015 15:47:08 +0100 Subject: [PATCH] cgconfig: Do not overwrite defaultcgroup configuration cpuset controller doesn't accept any tasks until cpuset.cpus and cpuset.mems are configured. cgconfig init script tries to create and configure defaultcgroup when enabled but it doesn't check whether the defaultcgroup already exists and it is configured from /etc/cgconfig.conf and happily overwrites the configuration. This is clearly wrong. Fix this simply by checking both knobs and inherit the value from root only when uninitialized. Signed-off-by: Michal Hocko <mho...@suse.cz> --- scripts/init.d/cgconfig.in | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/scripts/init.d/cgconfig.in b/scripts/init.d/cgconfig.in index f299d0ff3f73..45b370266f0c 100644 --- a/scripts/init.d/cgconfig.in +++ b/scripts/init.d/cgconfig.in @@ -78,13 +78,21 @@ create_default_groups() { cgcreate -f 664 -d 775 -g $controllers:$defaultcgroup 2>/dev/null # - # special rule for cpusets + # cpusets need cpus and mems to initialized which is not the case + # for the freshly created groups. Inherit values from / if the + # defaultcgroup is not initialized # if echo $controllers | grep -q -w cpuset; then - cpus=`cgget -nv -r cpuset.cpus /` - cgset -r cpuset.cpus=$cpus $defaultcgroup - mems=`cgget -nv -r cpuset.mems /` - cgset -r cpuset.mems=$mems $defaultcgroup + if [ -z "`cgget -nv -r cpuset.cpus $defaultcgroup`" ] + then + cpus=`cgget -nv -r cpuset.cpus /` + cgset -r cpuset.cpus=$cpus $defaultcgroup + fi + if [ -z "`cgget -nv -r cpuset.mems $defaultcgroup`" ] + then + mems=`cgget -nv -r cpuset.mems /` + cgset -r cpuset.mems=$mems $defaultcgroup + fi fi # -- 2.1.4 -- Michal Hocko SUSE Labs ------------------------------------------------------------------------------ New Year. New Location. New Benefits. New Data Center in Ashburn, VA. GigeNET is offering a free month of service with a new server in Ashburn. Choose from 2 high performing configs, both with 100TB of bandwidth. Higher redundancy.Lower latency.Increased capacity.Completely compliant. vanity: www.gigenet.com _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel