]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: Ignore def->cpumask if emulatorpin is specified
authorOsier Yang <jyang@redhat.com>
Fri, 12 Oct 2012 09:50:49 +0000 (17:50 +0800)
committerOsier Yang <jyang@redhat.com>
Mon, 15 Oct 2012 04:20:37 +0000 (12:20 +0800)
If the vcpu placement is "static", it's just fine to ignore the
def->cpumask if emulatorpin is specified.

src/qemu/qemu_process.c

index f8a2bfdebda113691fde2e54b1d3364cf0306509..ea25d8dab602fbe00d7f072785785871fa7c4d66 100644 (file)
@@ -2618,7 +2618,8 @@ static int qemuProcessHook(void *data)
 
     /* This must be done after cgroup placement to avoid resetting CPU
      * affinity */
-    if (qemuProcessInitCpuAffinity(h->driver, h->vm, h->nodemask) < 0)
+    if (!h->vm->def->cputune.emulatorpin &&
+        qemuProcessInitCpuAffinity(h->driver, h->vm, h->nodemask) < 0)
         goto cleanup;
 
     if (qemuProcessInitNumaMemoryPolicy(h->vm, h->nodemask) < 0)