]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
enable cgroup cpuset by default
authorHu Tao <hutao@cn.fujitsu.com>
Thu, 17 Nov 2011 09:44:12 +0000 (17:44 +0800)
committerEric Blake <eblake@redhat.com>
Fri, 18 Nov 2011 18:38:19 +0000 (11:38 -0700)
This prepares for subsequent patches which introduce dependence
on cgroup cpuset. Enable cgroup cpuset by default so users don't
have to modify configuration file before encountering a cpuset
error.

src/qemu/qemu.conf
src/qemu/qemu_conf.c

index 4da5d5a13fddcd0391f15c2050f1657686483d9c..1c14d8fb4ed5400dea710eba746eef1405b049bd 100644 (file)
 #  - 'devices' - use for device whitelisting
 #  - 'memory' - use for memory tunables
 #  - 'blkio' - use for block devices I/O tunables
+#  - 'cpuset' - use for CPUs and memory nodes
 #
 # NB, even if configured here, they won't be used unless
 # the administrator has mounted cgroups, e.g.:
 #
 #  mkdir /dev/cgroup
-#  mount -t cgroup -o devices,cpu,memory,blkio none /dev/cgroup
+#  mount -t cgroup -o devices,cpu,memory,blkio,cpuset none /dev/cgroup
 #
 # They can be mounted anywhere, and different controllers
 # can be mounted in different locations. libvirt will detect
 # where they are located.
 #
-# cgroup_controllers = [ "cpu", "devices", "memory", "blkio" ]
+# cgroup_controllers = [ "cpu", "devices", "memory", "blkio", "cpuset" ]
 
 # This is the basic set of devices allowed / required by
 # all virtual machines.
index 9d93371fed5a3fecb6182a314455975fe66fe0cb..0f98521a0a85b0ceb13558d14d9cd3c404dc570f 100644 (file)
@@ -303,7 +303,8 @@ int qemudLoadDriverConfig(struct qemud_driver *driver,
             (1 << VIR_CGROUP_CONTROLLER_CPU) |
             (1 << VIR_CGROUP_CONTROLLER_DEVICES) |
             (1 << VIR_CGROUP_CONTROLLER_MEMORY) |
-            (1 << VIR_CGROUP_CONTROLLER_BLKIO);
+            (1 << VIR_CGROUP_CONTROLLER_BLKIO) |
+            (1 << VIR_CGROUP_CONTROLLER_CPUSET);
     }
     for (i = 0 ; i < VIR_CGROUP_CONTROLLER_LAST ; i++) {
         if (driver->cgroupControllers & (1 << i)) {