Re: [PATCH] qemu: Use memory-object-file when needed

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

 



On Tue, Jan 12, 2016 at 06:48:02PM +0100, Martin Kletzander wrote:
We were missing a check for '!nodemask' in the condition that decides
whether we need memory-object-file or not.  We only used userNodeset,
but forgot that we might need to use nodemask even if that's not set.

Even though there was a test for this, the args file was incorrect, so
it is very nicely visible what this change does function-wise.  Even
with that I added the same test but instead of auto nodeset I specified
one in numatune/memory just to make sure it fixes the problem.

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
src/qemu/qemu_command.c                            |  3 ++-
.../qemuxml2argv-numatune-auto-prefer.args         |  4 ++-
...emuxml2argv-numatune-hugepages-no-memnode.args} |  3 ++-
.../qemuxml2argv-numatune-hugepages-no-memnode.xml | 29 ++++++++++++++++++++++
tests/qemuxml2argvtest.c                           |  2 ++
5 files changed, 38 insertions(+), 3 deletions(-)
copy tests/qemuxml2argvdata/{qemuxml2argv-numatune-auto-prefer.args => qemuxml2argv-numatune-hugepages-no-memnode.args} (72%)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-numatune-hugepages-no-memnode.xml


I forgot to run 'git commit --amend' before 'git send-email', so this
needs to be considered squashed in:

diff --git c/src/qemu/qemu_command.c i/src/qemu/qemu_command.c
index debaea491be8..55f19a27272c 100644
--- c/src/qemu/qemu_command.c
+++ i/src/qemu/qemu_command.c
@@ -5238,8 +5238,7 @@ qemuBuildMemoryBackendStr(unsigned long long size,
    }

    /* If none of the following is requested... */
-    if (!pagesize && !userNodeset && !memAccess &&
-        !nodeSpecified && !nodemask && !force) {
+    if (!pagesize && !nodemask && !memAccess && !nodeSpecified && !force) {
        /* report back that using the new backend is not necessary
         * to achieve the desired configuration */
        ret = 1;
--

Basically I just used 'nodemask' instead of 'userNodeset'.  It works
even without this diff because nodemask will always be set if
userNodeset is set, it's just redundant to specify both.

Martin

Attachment: signature.asc
Description: PGP signature

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