Re: [RFC] - Some notions that I would like comments on

Stephen C. Tweedie (sct@redhat.com)
Wed, 14 Jul 1999 14:15:55 +0100 (BST)


Hi,

On Tue, 13 Jul 1999 20:31:48 +0200, Jamie Lokier
<lkd@tantalophile.demon.co.uk> said:

> This is done already and automatically -- it's called readahead.
> The kernel detects when you're reading sequentially and then
> reads ahead.

> We don't do it on mmaped areas yet though.

In 2.2, we do --- sort of. We "readaround", instead --- we page in an
entire contiguuous 64k-long, 64k-aligned chunk of the file by default
(less on low-memory machines).

In conjunction with the disk track buffer, this has the effect of
readahead if you are accessing a mmaped file sequentially in memory ---
on 2.2, programs which use mmap (such as grep) will happily run at disk
speed now. The readaround algorithm has the advantage over readahead
that it also works very well when randomly paging in executable files
(this is why netscape loads 2 to 3 times faster on 2.2 than on 2.0 on my
machines).

--Stephen

-
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/