]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Don't create dirs in cgroup controllers we don't want to use
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 21 Mar 2013 13:27:13 +0000 (13:27 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 5 Apr 2013 09:41:54 +0000 (10:41 +0100)
commit56f27b3bbcbb45a025b8471cafabad8e1928cf15
tree09e5d45d4bd77b3b4063d2203da0818863d85161
parent804a809a063ee31d592d0c8134e30a8514bbf40b
Don't create dirs in cgroup controllers we don't want to use

Currently when getting an instance of virCgroupPtr we will
create the path in all cgroup controllers. Only at the virt
driver layer are we attempting to filter controllers. This
is bad because the mere act of creating the dirs in the
controllers can have a functional impact on the kernel,
particularly for performance.

Update the virCgroupForDriver() method to accept a bitmask
of controllers to use. Only create dirs in the controllers
that are requested. When creating cgroups for domains,
respect the active controller list from the parent cgroup

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_cgroup.c
src/lxc/lxc_driver.c
src/qemu/qemu_cgroup.c
src/qemu/qemu_conf.c
src/qemu/qemu_driver.c
src/util/vircgroup.c
src/util/vircgroup.h