[PATCH 2/2] qemuDomainPinIOThread: Update live definition after process pinning

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

 



Otherwise we'll keep using the new pinning value even if it can't be
applied to the thread.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2040555
Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 077547e1d3..3c0c81a6b9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5018,10 +5018,6 @@ qemuDomainPinIOThread(virDomainPtr dom,
             goto endjob;
         }

-        virBitmapFree(iothrid->cpumask);
-        iothrid->cpumask = virBitmapNewCopy(pcpumap);
-        iothrid->autofill = false;
-
         /* Configure the corresponding cpuset cgroup before set affinity. */
         if (virCgroupHasController(priv->cgroup,
                                    VIR_CGROUP_CONTROLLER_CPUSET)) {
@@ -5039,6 +5035,10 @@ qemuDomainPinIOThread(virDomainPtr dom,
         if (virProcessSetAffinity(iothrid->thread_id, pcpumap, false) < 0)
             goto endjob;

+        virBitmapFree(iothrid->cpumask);
+        iothrid->cpumask = virBitmapNewCopy(pcpumap);
+        iothrid->autofill = false;
+
         qemuDomainSaveStatus(vm);

         if (g_snprintf(paramField, VIR_TYPED_PARAM_FIELD_LENGTH,
-- 
2.34.1




[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]

  Powered by Linux