]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Qemu: ask for memory preallocation with large pages
authorDaniel Veillard <veillard@redhat.com>
Thu, 7 Jan 2010 13:48:06 +0000 (14:48 +0100)
committerDaniel Veillard <veillard@redhat.com>
Fri, 8 Jan 2010 11:17:35 +0000 (12:17 +0100)
The -mem-prealloc flag should be used when using large pages
This ensures qemu tries to allocate all required memory immediately,
rather than when first used. The latter mode will crash qemu
if hugepages aren't available when accessed, while the former
should gracefully fallback to non-hugepages.

* src/qemu/qemu_conf.c: add -mem-prealloc flag to qemu command line
  when using large pages

src/qemu/qemu_conf.c

index 824055f3caebe8a8325e6ec01522900d44bc7c1b..d3da7768d282a4c59d69796a7d4907708a6c461f 100644 (file)
@@ -2108,6 +2108,7 @@ int qemudBuildCommandLine(virConnectPtr conn,
                              def->emulator);
             goto error;
         }
+        ADD_ARG_LIT("-mem-prealloc");
         ADD_ARG_LIT("-mem-path");
         ADD_ARG_LIT(driver->hugepage_path);
     }