Hi Martin, 

I see, the memory from the node specified in numatune is used correctly.
Wit your change memory-backend-file is used to enforce that 

But, I see the migrations from old versions(my case, 1.2.5) seems to fail
as there was no backend-file before and only backend-ram. 

Unknown ramblock "ppc_spapr.ram", cannot accept migration
2016-01-13T08:16:17.488267Z qemu-system-ppc64-hp: error while loading state for instance 0x0 of device 'ram'

Should we be using -mem-path /dev/hugepages/libvirt/qemu along with memory-backend-ram instead?

Thanks,
Shivaprasad 
My guest :  https://paste.fedoraproject.org/310103/67350814/ 
PS: I have some private changes in 1.2.5 but I believe that doesn't affect anything here. Please let me know if you cant hit it.

On Tue, Jan 12, 2016 at 11:28 PM, Martin Kletzander <mkletzan@redhat.com> wrote:
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@redhat.com>
---
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

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