Re: mmap() is slower than read() on SCSI/IDE on 2.0 and 2.1

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Tue, 15 Dec 1998 01:29:09 +0000


On Mon, Dec 14, 1998 at 06:07:37AM -0800, David S. Miller wrote:
> Programs in your system, as they run, fault in different pages of the
> C library right? After some time, more and more of libc resides in
> the page cache and no I/O is needed. So if the optimization is "at
> mmap() time, setup the page table entries for pages which we have in
> ram already right then" what is your upper bound on this? The problem
> is what if this is just some short lived program which only needs one
> or two pages or libc to do it's work and then exit()? We don't want
> to spend all of our time setting up all of his page tables when he
> will use only a few.

You don't have to set up all his page tables in advance of needing them.
In fact, you don't _want_ to do that, or you'll get no fault before the
end of the in-core area to tell you to read ahead further on in the
file.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/