qemu: vcpupin: Always set affinity even when cgroups are supported

VM startup and CPU hotplug always set the affinity regardless of cgroups
support. Use the same approach for the pinning API.
This commit is contained in:
Peter Krempa 2016-02-12 07:05:24 +01:00
parent 471741309d
commit 9958422d10

View 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;