• D
    Create + setup cgroups atomically for QEMU process · 2049ef99
    Daniel P. Berrange 提交于
    Currently the QEMU driver creates the VM's cgroup prior to
    forking, and then uses a virCommand hook to move the child
    into the cgroup. This won't work with systemd whose APIs
    do the creation of cgroups + attachment of processes atomically.
    
    Fortunately we have a handshake taking place between the
    QEMU driver and the child process prior to QEMU being exec()d,
    which was introduced to allow setup of disk locking. By good
    fortune this synchronization point can be used to enable the
    QEMU driver to do atomic setup of cgroups removing the use
    of the hook script.
    Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
    2049ef99
qemu_cgroup.c 29.1 KB