The order of pinning priority (at least for emulator thread) was
set by v1.2.15-rc1~58 (for cgroup code). But later, when
automatic placement was implemented into
qemuDomainGetEmulatorPinInfo(), the priority was not honored.
Now that we have this priority code in a separate function, we
can just call that and avoid this type of error.
Fixes: 776924e37649f2d47acd805746d5fd9325212ea5
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
Reviewed-by: Andrea Bolognani <abologna(a)redhat.com>
---
src/qemu/qemu_driver.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index fd8136be37..754b2a8192 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4574,14 +4574,9 @@ qemuDomainGetEmulatorPinInfo(virDomainPtr dom,
if (live)
autoCpuset = QEMU_DOMAIN_PRIVATE(vm)->autoCpuset;
- if (def->cputune.emulatorpin) {
- cpumask = def->cputune.emulatorpin;
- } else if (def->cpumask) {
- cpumask = def->cpumask;
- } else if (vm->def->placement_mode == VIR_DOMAIN_CPU_PLACEMENT_MODE_AUTO
&&
- autoCpuset) {
- cpumask = autoCpuset;
- } else {
+ if (!(cpumask = qemuDomainEvaluateCPUMask(def,
+ def->cputune.emulatorpin,
+ autoCpuset))) {
if (!(bitmap = virHostCPUGetAvailableCPUsBitmap()))
goto cleanup;
cpumask = bitmap;
--
2.39.2