[libvirt] [PATCH] qemu: emulatorpin: Don't reset pinning when pinning to all cpus

Similarly to 3813b648e9761aeed5b4f3ee7e62253a9172ce8e remove the default pinning assumption from emulatorpin. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1227180 --- src/qemu/qemu_driver.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 34e5581..c8e4aa9 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -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); -- 2.4.1

On 12.06.2015 15:57, Peter Krempa wrote:
Similarly to 3813b648e9761aeed5b4f3ee7e62253a9172ce8e remove the default pinning assumption from emulatorpin.
There's no such commit. Were you referring to a commit on your local branch perhaps?
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1227180 --- src/qemu/qemu_driver.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
ACK if you update the commit message. Michal

On Mon, Jun 15, 2015 at 16:04:29 +0200, Michal Privoznik wrote:
On 12.06.2015 15:57, Peter Krempa wrote:
Similarly to 3813b648e9761aeed5b4f3ee7e62253a9172ce8e remove the default pinning assumption from emulatorpin.
There's no such commit. Were you referring to a commit on your local branch perhaps?
Indeed, the upstream commit ID for the one I wanted to refer to is a02a161bb8a6caf0db4dd446ed1cdf53d97b40b9
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1227180 --- src/qemu/qemu_driver.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)
ACK if you update the commit message.
I'll fix it and push. Thanks.
participants (2)
-
Michal Privoznik
-
Peter Krempa