Thread (7 messages) 7 messages, 5 authors, 2000-02-24

Re: mmap/munmap semantics

From: Stephen C. Tweedie <hidden>
Date: 2000-02-24 12:13:43

Hi,

On Thu, 24 Feb 2000 03:35:02 +0100, Jamie Lokier
[off-list ref] said:
I don't think MADV_DONTNEED actually drops privately modified data does
it?  
Yes, it does.  From the DU man pages:

      MADV_DONTNEED
                      Do not need these pages

                      The system will free any whole pages in the specified
                      region.  All modifications will be lost and any swapped
                      out pages will be discarded.  Subsequent access to the
                      region will result in a zero-fill-on-demand fault as
                      though it is being accessed for the first time.
                      Reserved swap space is not affected by this call.

Regarding the other half of the problem --- zeroing out a portion of a
file without further IO --- the splice code I hope to have using kiobufs
in 2.5 will allow this to be done very easily.  You'll be able to take a
region of /dev/zero and splice it into your open file with zero-copy.

--Stephen
--
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.eu.org/Linux-MM/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help