Thread (38 messages) 38 messages, 7 authors, 2010-01-20

Re: [PATCH v6] add MAP_UNLOCKED mmap flag

From: Gleb Natapov <hidden>
Date: 2010-01-19 08:27:40
Also in: linux-mm, lkml

On Tue, Jan 19, 2010 at 10:07:07AM +0200, Pekka Enberg wrote:
Hi Gleb,

On Tue, Jan 19, 2010 at 9:52 AM, Gleb Natapov [off-list ref] wrote:
quoted
quoted
It would be probably useful if you could point us to the application
source code that actually wants this feature.
This is two line patch to qemu that calls mlockall(MCL_CURRENT|MCL_FUTURE)
at the beginning of the main() and changes guest memory allocation to
use MAP_UNLOCKED flag. All alternative solutions in this thread suggest
that I should rewrite qemu + all library it uses. You see why I can't
take them seriously?
Well, that's not going to be portable, is it, so the application
KVM is not portable ;) and that is what my main interest is.
design would still be broken, no? Did you try using (or extending)
posix_madvise(MADV_DONTNEED) for the guest address space? It seems to
After mlockall() I can't even allocate guest address space. Or do you mean
instead of mlockall()? Then how MADV_DONTNEED will help? It just drops
page table for the address range (which is not what I need) and does not
have any long time effect.
me that you're trying to use a big hammer (mlock) when a polite hint
for the VM would probably be sufficient for it do its job.
I what to tell to VM "swap this, don't swap that" and as far as I see
there is no other way to do it currently.

--
			Gleb.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help