Re: A use case for MAP_COPY

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

 



On Thu, Jan 5, 2017 at 1:10 PM, George Spelvin
<linux@xxxxxxxxxxxxxxxxxxx> wrote:
>
>> Not going to happen.
>
> Really?  Because the rest of your response is a lot more encouraging.

The thing is, I don't think you can do it with a reasonable patch. It
just gets too nasty.

For example, what happens when there is low memory? What you would
*want* to happen is to just forget the page and read it back in.
That/s how MAP_PRIVATE works. But that won't actually work for
MAP_COPY. You'd need to page the thing out, as if you had written to
it (even though you didn't). Not because you want to, but because your
versioning scheme depends on it.

So how are y ou going to solve that versioning probnlem wrt memory
pressure? The whole point of MAP_COPY is to avoid a memory copy, but
if you now end up having to do IO, and having to have a swap device
for it, it's completely unacceptable. See?

How are you going to avoid the issues with growing 'struct page'?

So the fact is, it's a horrible idea. I don't think you understand how
horrible it is. The only way you'll understand is if you try to write
the patch.

"Siperia opettaa".

So you can try to prove me wrong by sending a patch. I doubt you will.

                  Linus

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]