[libvirt] [PATCH v1 6/6] disable cgroup cpuset by default

Hu Tao hutao at cn.fujitsu.com
Wed Nov 7 10:38:46 UTC 2012


The reason to disable cgroup cpuset by default is: currently,
sub-directories of cgroup cpuset won't be auto-updated if
cpu hot-plug happens. For example, if we now have 0-3,5-7 pcpus
online, the value of /sys/fs/cgroup/cpuset/libvirt/qemu/mydom/cpuset.cpus
is 0-3,5-7, then pcpu 4 is hot-plugged, but the value of cpuset.cpus
is still 0-3,5-7. This will cause a problem that we can't pin
to a hot-plugged pcpu.

Users can still enable cpuset by editing qemu.conf.
---
 src/qemu/qemu.conf   | 2 +-
 src/qemu/qemu_conf.c | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index dd853c8..b853852 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -226,7 +226,7 @@
 # can be mounted in different locations. libvirt will detect
 # where they are located.
 #
-#cgroup_controllers = [ "cpu", "devices", "memory", "blkio", "cpuset", "cpuacct" ]
+#cgroup_controllers = [ "cpu", "devices", "memory", "blkio", "cpuacct" ]
 
 # This is the basic set of devices allowed / required by
 # all virtual machines.
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index dc4d680..92c1864 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -402,7 +402,6 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
             (1 << VIR_CGROUP_CONTROLLER_DEVICES) |
             (1 << VIR_CGROUP_CONTROLLER_MEMORY) |
             (1 << VIR_CGROUP_CONTROLLER_BLKIO) |
-            (1 << VIR_CGROUP_CONTROLLER_CPUSET) |
             (1 << VIR_CGROUP_CONTROLLER_CPUACCT);
     }
     for (i = 0 ; i < VIR_CGROUP_CONTROLLER_LAST ; i++) {
-- 
1.7.11.7




More information about the libvir-list mailing list