Re: mmap() versus read()

Stephen C. Tweedie (
Sat, 7 Mar 1998 23:54:23 GMT


On Fri, 06 Mar 1998 08:29:34 -0500, mlord <> said:

> Alan Cox wrote:
>> mmap doesnt do readahead on faults in 2.0.x, that increases the I/O load
>> when paging mmap data versus read() quite a lot

> I wonder why we bother paging mmap'd data that could instead
> be re-read from the original file on disk? Or did I read that wrong?

Hmm? Paging mmap()ed data *is* exactly the same as rereading it from
the original file on disk. "Paging" refers to the pulling in of virtual
memory pages from any location on disk, not necessarily from the swap
file. The difference is only that mapped files get paged from their
primary storage, whereas anonymous private data gets paged into and out
of swap files.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to