]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: emulatorpin: Don't reset pinning when pinning to all cpus
authorPeter Krempa <pkrempa@redhat.com>
Fri, 12 Jun 2015 13:53:05 +0000 (15:53 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 15 Jun 2015 14:18:49 +0000 (16:18 +0200)
Similarly to a02a161bb8a6caf0db4dd446ed1cdf53d97b40 remove the default
pinning assumption from emulatorpin.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1227180

src/qemu/qemu_driver.c

index 6bb85493ed89a17e5479bd23a8d235c41e8b6bfd..d1f195c3eca559aae15b116a24288ae1b4d1cf82 100644 (file)
@@ -5285,7 +5285,6 @@ qemuDomainPinEmulator(virDomainPtr dom,
     virDomainDefPtr persistentDef;
     int ret = -1;
     qemuDomainObjPrivatePtr priv;
-    bool doReset = false;
     virBitmapPtr pcpumap = NULL;
     virQEMUDriverConfigPtr cfg = NULL;
     virObjectEventPtr event = NULL;
@@ -5329,12 +5328,6 @@ qemuDomainPinEmulator(virDomainPtr dom,
         goto endjob;
     }
 
-    /* pinning to all physical cpus means resetting,
-     * so check if we can reset setting.
-     */
-    if (virBitmapIsAllSet(pcpumap))
-        doReset = true;
-
     if (def) {
         if (virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET)) {
             if (virCgroupNewThread(priv->cgroup, VIR_CGROUP_THREAD_EMULATOR,
@@ -5359,8 +5352,7 @@ qemuDomainPinEmulator(virDomainPtr dom,
         virBitmapFree(def->cputune.emulatorpin);
         def->cputune.emulatorpin = NULL;
 
-        if (!doReset &&
-            !(def->cputune.emulatorpin = virBitmapNewCopy(pcpumap)))
+        if (!(def->cputune.emulatorpin = virBitmapNewCopy(pcpumap)))
             goto endjob;
 
         if (virDomainSaveStatus(driver->xmlopt, cfg->stateDir, vm) < 0)
@@ -5380,8 +5372,7 @@ qemuDomainPinEmulator(virDomainPtr dom,
         virBitmapFree(persistentDef->cputune.emulatorpin);
         persistentDef->cputune.emulatorpin = NULL;
 
-        if (!doReset &&
-            !(persistentDef->cputune.emulatorpin = virBitmapNewCopy(pcpumap)))
+        if (!(persistentDef->cputune.emulatorpin = virBitmapNewCopy(pcpumap)))
             goto endjob;
 
         ret = virDomainSaveConfig(cfg->configDir, persistentDef);