|
From: | Michael Roth |
Subject: | Re: [Qemu-devel] [PATCH] add MADV_DONTFORK to guest physical memory |
Date: | Wed, 05 Jan 2011 15:27:37 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 |
On 01/05/2011 02:35 PM, Andrea Arcangeli wrote:
On Wed, Jan 05, 2011 at 02:26:19PM -0600, Michael Roth wrote:Yah you're right, but I've seen several discussions about using mempath for tmpfs/ram-backed files for things like numa/zram/etc so tend to think of it as something potentially more than just a hook for hugetlbfs, which is becoming less and less useful. But the MADV_DONTFORK stuff should still be immediately applicable.Yes, MADV_DONTFORK should be set all on all guest physical memory without options so I hope the new patch I just posted is fine to stop the spurious -ENOMEM failures in fork.
The patch in this thread? A couple paths still aren't covered when using -mem-path. Something like this should get them all:
diff --git a/exec.c b/exec.c index 49c28b1..cbdcb16 100644 --- a/exec.c +++ b/exec.c@@ -2853,6 +2853,9 @@ ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name,
#endif qemu_madvise(new_block->host, size, QEMU_MADV_MERGEABLE); } + + /* no allocation failures during fork/exec for migrate/hotplug */ + qemu_madvise(new_block->host, size, QEMU_MADV_DONTFORK); }
[Prev in Thread] | Current Thread | [Next in Thread] |