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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]