On 11/29/18 9:58 AM, Michal Privoznik wrote: > On 11/5/18 3:49 PM, Michal Privoznik wrote: >> https://bugzilla.redhat.com/show_bug.cgi?id=1624223 >> >> There are two ways to request memory preallocation on cmd line: >> -mem-prealloc and .prealloc attribute to memory-backend-file. >> However, as it turns out it's not safe to use both at the same >> time. Prefer -mem-prealloc as it is more backward compatible >> compared to switching to "-numa node,memdev= + -object >> memory-backend-file". >> >> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> >> --- >> src/qemu/qemu_command.c | 37 +++++++++++++------ >> src/qemu/qemu_command.h | 1 + >> src/qemu/qemu_domain.c | 2 + >> src/qemu/qemu_domain.h | 3 ++ >> src/qemu/qemu_hotplug.c | 3 +- >> .../hugepages-numa-default-dimm.args | 2 +- >> 6 files changed, 35 insertions(+), 13 deletions(-) > > Ping? > Sorry, the faster I pedal the bicycle the further I get behind the train :-). Still is what you're asking "is the patch in it's current form OK" - in general, I think so, although given what you've learned and comments already provided - can you update and repost just for completeness... Tks John > After some discussion with QEMU devels, I found out that this might be > harmful/suboptimal. Thing is, if -mem-prealloc is used then qemu will > fully allocate the memory (this is done by actually touching every page > that has been allocated). Then, if .prealloc=yes is specified, > mbind(flags = MPOL_MF_STRICT | MPOL_MF_MOVE) is called which: > > a) has to (possibly) move the memory to a different NUMA node, > b) can have no effect when hugepages are in play (thus ignoring user > request to place memory on desired NUMA nodes). > > While I could live with a), I couldn't with b). The patch is still valid. > > Michal > > -- > libvir-list mailing list > libvir-list@xxxxxxxxxx > https://www.redhat.com/mailman/listinfo/libvir-list > -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list