Re: mmap() versus read()

Kenneth Albanowski (kjahds@kjahds.com)
Sun, 8 Mar 1998 00:54:11 -0500 (EST)


On Fri, 6 Mar 1998, Alan Cox wrote:

> > So is this expected? Is there a knob I can twist? Is this just 2.0.32
> > buffer problems and would be fixed by 2.0.33?
>
> 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

My assumption has always been that mmap() isn't well suited for reading
through a file once (random or sequential doesn't matter), as the kernel
has no way of knowing that the blocks most recently paged in will probably
not be needed again any time soon. Perhaps this (if it is an issue) could
be ameliorated by changing the default page age values based on a
MAP_DISCARD_EASILY flag.

-- 
Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu