Re: mmap() versus read()

Chris Evans (chris@ferret.lmh.ox.ac.uk)
Sun, 8 Mar 1998 13:15:45 +0000 (GMT)


On Sun, 8 Mar 1998, Erik Corry wrote:

> Take a look at madvise for Solaris. You can say for a
> mmaped area that you are going to read sequentially (do
> lots of readahead), read randomly (do no readahead at all),
> that you are going to need an area soon, or that you are
> (probably) not going to need the area at all any more.

I see no reason for an madvise() -- the kernel should be able to monitor
faults and if they are sequential, decided for _itself_ that lots of
readahead is a good idea. Calling madvise() is still incurring the
overhead of a system call too.

Chris

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