[libvirt] [PATCH 1/2] qemu: emulatorpin: Always set affinity when pinning emulator thread

Peter Krempa pkrempa at redhat.com
Fri Feb 19 15:24:37 UTC 2016


Similarly to VM startup always set the legacy affinity. Additionally we
don't need to report an explicit error since virProcessSetAffinity
reports them themselves.
---
 src/qemu/qemu_driver.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 1927b3c..4861254 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5276,15 +5276,11 @@ qemuDomainPinEmulator(virDomainPtr dom,
                                  " for emulator threads"));
                 goto endjob;
             }
-        } else {
-            if (virProcessSetAffinity(vm->pid, pcpumap) < 0) {
-                virReportError(VIR_ERR_SYSTEM_ERROR, "%s",
-                               _("failed to set cpu affinity for "
-                                 "emulator thread"));
-                goto endjob;
-            }
         }

+        if (virProcessSetAffinity(vm->pid, pcpumap) < 0)
+            goto endjob;
+
         virBitmapFree(def->cputune.emulatorpin);
         def->cputune.emulatorpin = NULL;

-- 
2.6.2




More information about the libvir-list mailing list