qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] add MADV_DONTFORK to guest physical memory


From: Michael Roth
Subject: Re: [Qemu-devel] [PATCH] add MADV_DONTFORK to guest physical memory
Date: Wed, 05 Jan 2011 12:02:20 -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 09:10 AM, Andrea Arcangeli wrote:
The bug is still there so I rediffed the old patch against current
code.

On a related topic: could somebody give me advice on how to implement
a command line (command line seems enough, the other option would be
monitor command) to make the MADV_MERGEABLE conditional? I got KSM on
THP working fine but KSM may decrease performance by increasing the
number of copy on write and by splitting hugepages, so we'd like to be
able to turn off KSM on a per-VM basis (not on the whole host, which
of course we already can by setting /sys/kernel/mm/ksm/run to 0) so
that high perf VMs will keep running at maximum speed with KSM off but
others may still benefit from KSM. For that I need to make the below
MADV_MERGEABLE madvise conditional to something and the code itself
will be trivial, we've just to converge on a command line option
(hopefully quickly ;).

There was a -mem_prealloc option added a while back to set MAP_POPULATE on memory mapped in via the -mem-path option. So an analogous -mem_nomerge option or something along that line seems reasonable for conditionally unsetting QEMU_MADV_MERGEABLE.

And for consistency you should probably make both your proposed changes for -mem-path'd memory as well.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]