On 10.04.2013 12:08, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> > > Historically QEMU/LXC guests have been placed in a cgroup layout > that is > > $LOCATION-OF-LIBVIRTD/libvirt/{qemu,lxc}/$VMNAME > > This is bad for a number of reasons > > - The cgroup hierarchy gets very deep which seriously > impacts kernel performance due to cgroups scalability > limitations. > > - It is hard to setup cgroup policies which apply across > services and virtual machines, since all VMs are underneath > the libvirtd service. > > To address this the default cgroup location is changed to > be > > /system/$VMNAME.{lxc,qemu}.libvirt > > This puts virtual machines at the same level in the hierarchy > as system services, allowing consistent policy to be setup > across all of them. > > This also honours the new resource partition location from the > XML configuration, for example > > <resource> > <partition>/virtualmachines/production</partitions> > </resource> > > will result in the VM being placed at > > /virtualmachines/production/$VMNAME.{lxc,qemu}.libvirt > > NB, with the exception of the default, /system, path which > is intended to always exist, libvirt will not attempt to > auto-create the partitions in the XML. It is the responsibility > of the admin/app to configure the partitions. Later libvirt > APIs will provide a way todo this. This NB part shall be duplicated to the docs from previous patch. > > Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx> > --- > src/lxc/lxc_cgroup.c | 91 +++++++++++++++++++++++++++++++------- > src/lxc/lxc_cgroup.h | 2 +- > src/lxc/lxc_process.c | 4 +- > src/qemu/qemu_cgroup.c | 114 +++++++++++++++++++++++++++++++++++++----------- > src/qemu/qemu_cgroup.h | 3 +- > src/qemu/qemu_process.c | 2 +- > 6 files changed, 169 insertions(+), 47 deletions(-) ACK Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list