]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: vcpupin: Always set affinity even when cgroups are supported
authorPeter Krempa <pkrempa@redhat.com>
Fri, 12 Feb 2016 06:05:24 +0000 (07:05 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 19 Feb 2016 14:23:54 +0000 (15:23 +0100)
VM startup and CPU hotplug always set the affinity regardless of cgroups
support. Use the same approach for the pinning API.

src/qemu/qemu_driver.c

index 24c1ca4386af7060bc0b19e89d87e34243addd8c..d1e51889bcdb64408792da41805142f7aeca0e05 100644 (file)
@@ -5068,12 +5068,11 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
                 goto endjob;
             if (qemuSetupCgroupCpusetCpus(cgroup_vcpu, pcpumap) < 0)
                 goto endjob;
-        } else {
-            if (virProcessSetAffinity(qemuDomainGetVcpuPid(vm, vcpu),
-                                      pcpumap) < 0)
-                goto endjob;
         }
 
+        if (virProcessSetAffinity(qemuDomainGetVcpuPid(vm, vcpu), pcpumap) < 0)
+            goto endjob;
+
         virBitmapFree(vcpuinfolive->cpumask);
         vcpuinfolive->cpumask = pcpumaplive;
         pcpumaplive = NULL;