[libvirt] [PATCHv2 02/11] enable cgroup cpuset by default
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 |5 +++-- src/qemu/qemu_conf.c |3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf index 4da5d5a..1c14d8f 100644 --- a/src/qemu/qemu.conf +++ b/src/qemu/qemu.conf @@ -157,18 +157,19 @@ # - '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. diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index d7e9d7d..dfcc6e3 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -304,7 +304,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)) { -- 1.7.3.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCHv2 02/11] enable cgroup cpuset by default
On Thu, Nov 17, 2011 at 05:44:12PM +0800, Hu Tao wrote: > 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 |5 +++-- > src/qemu/qemu_conf.c |3 ++- > 2 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf > index 4da5d5a..1c14d8f 100644 > --- a/src/qemu/qemu.conf > +++ b/src/qemu/qemu.conf > @@ -157,18 +157,19 @@ > # - '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. > diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c > index d7e9d7d..dfcc6e3 100644 > --- a/src/qemu/qemu_conf.c > +++ b/src/qemu/qemu_conf.c > @@ -304,7 +304,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)) { ACK Daniel -- |: http://berrange.com -o-http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCHv2 02/11] enable cgroup cpuset by default
On 11/18/2011 03:34 AM, Daniel P. Berrange wrote: > On Thu, Nov 17, 2011 at 05:44:12PM +0800, Hu Tao wrote: >> 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 |5 +++-- >> src/qemu/qemu_conf.c |3 ++- >> 2 files changed, 5 insertions(+), 3 deletions(-) >> > > ACK Pushed. -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signature.asc Description: OpenPGP digital signature -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list