]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu_cgroup: put qemu right into emulator sub-cgroup
authorHenning Schild <henning.schild@siemens.com>
Fri, 26 Feb 2016 15:34:23 +0000 (16:34 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 1 Mar 2016 14:07:27 +0000 (14:07 +0000)
Move qemuProcessSetupEmulator up under qemuSetupCgroup. That way
we move the one main thread right into the emulator cgroup, instead
of moving multiple threads later on. And we do not actually want any
threads running in the parent cgroups (cpu cpuacct cpuset).

Signed-off-by: Henning Schild <henning.schild@siemens.com>
src/qemu/qemu_process.c

index 2fd384f0d58fb49f6f3b6f855a27ca04e3878235..fa2bdb834eb9c6164085ecd1f89241db2638e540 100644 (file)
@@ -5155,6 +5155,10 @@ qemuProcessLaunch(virConnectPtr conn,
         qemuProcessInitCpuAffinity(vm) < 0)
         goto cleanup;
 
+    VIR_DEBUG("Setting emulator tuning/settings");
+    if (qemuProcessSetupEmulator(vm) < 0)
+        goto cleanup;
+
     VIR_DEBUG("Setting domain security labels");
     if (virSecurityManagerSetAllLabel(driver->securityManager,
                                       vm->def,
@@ -5197,10 +5201,6 @@ qemuProcessLaunch(virConnectPtr conn,
     if (rv == -1) /* The VM failed to start */
         goto cleanup;
 
-    VIR_DEBUG("Setting emulator tuning/settings");
-    if (qemuProcessSetupEmulator(vm) < 0)
-        goto cleanup;
-
     VIR_DEBUG("Waiting for monitor to show up");
     if (qemuProcessWaitForMonitor(driver, vm, asyncJob, priv->qemuCaps, logCtxt) < 0)
         goto cleanup;