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 12:08:16
Also in: linux-mm, lkml

On Tue, Jan 19, 2010 at 11:54:42AM +0000, Alan Cox wrote:
quoted
In my case (virtualization) I want to test/profile guest under heavy swapping
of a guests memory, so I intentionally create memory shortage by creating
guest much large then host memory, but I want system to swap out only
guest's memory.
So this isn't an API question this is an obscure corner case testing
question.
It is real use case scenario where the kernel doesn't provider me with
enough rope. You, of course, can dismiss it as "obscure corner case". You
can't expect issues with mlockall() which is corner case by itself to be
mainstream, can you?
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?
And you want millions of users to have kernels with weird extra functions
whole sole value is one test environment you wish to run
We are talking about 4 lines of code that other people find useful too
and they commented in this thread. This wouldn't be the first kernel
feature not used by millions of people.
See why we can't take you seriously either ?
I was taking about solutions. Thank you.

--
			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