]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
Setup LXC cgroups in two phases
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 14 Mar 2013 12:47:28 +0000 (12:47 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 19 Mar 2013 14:46:35 +0000 (14:46 +0000)
commit1760258cc396ad271ab6dd3342f3e7af7c722e00
tree8553ee01c26f223c5d0aaa52847ab75e18191c28
parentebf78be4c277cffae57d99daa199a9b3c1cf9804
Setup LXC cgroups in two phases

Currently the LXC controller creates the cgroup, configures the
resources and adds the task all in one go. This is not sufficiently
flexible for the forthcoming NBD integration. We need to make sure
the NBD process gets into the right cgroup immediately, but we can
not have limits (in particular the device ACL) applied at the point
where we start qemu-nbd. So create a virLXCCgroupCreate method
which creates the cgroup and adds the current task to be called
early, and leave virLXCCgroupSetup to only do resource config.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
src/lxc/lxc_cgroup.c
src/lxc/lxc_cgroup.h
src/lxc/lxc_controller.c