Skip to contentSkip to conversation

Fix -mem-path with hugetlbfs

PATCH Applied Marcelo Tosatti 2 participants 2 messages May 3, 2010 – May 5, 2010 KVM

lore
Share & tools
lore
#0 lore raw

Avi, please apply to both master and uq/master.

---

Fallback to qemu_vmalloc in case file_ram_alloc fails.

exec.c +6 -2
index 467a0e7..7125a93 100644
@@ -2821,8 +2821,12 @@ ram_addr_t qemu_ram_alloc(ram_addr_t size)
     if (mem_path) {
 #if defined (__linux__) && !defined(TARGET_S390X)
         new_block->host = file_ram_alloc(size, mem_path);
-        if (!new_block->host)
-            exit(1);
+        if (!new_block->host) {
+            new_block->host = qemu_vmalloc(size);
+#ifdef MADV_MERGEABLE
+            madvise(new_block->host, size, MADV_MERGEABLE);
+#endif
+        }
 #else
         fprintf(stderr, "-mem-path option unsupported\n");
         exit(1);
Applied
#1 lore raw
Quoted 6 lines · Marcelo Tosatti

Avi, please apply to both master and uq/master.

---

Fallback to qemu_vmalloc in case file_ram_alloc fails.

applied to both, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function