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

Rik van Riel (H.H.vanRiel@phys.uu.nl)
Thu, 17 Dec 1998 00:53:54 +0100 (CET)


On Tue, 15 Dec 1998, Jay Nordwick wrote:

> >Nice, but *how* ?
> >Does it just use `map 8 implies prefetch 16-31' ?
> >If so, what if the application does 1 3 5 7 9 ?
> >Or what if the application does `1 567 34 90 9486 8' ?
> >Should the last 8 trigger prefetch of 16-31 ?
>
> This is not really a problem, I don't think.
> A simple heuristic *could* be: when X pages have been
> accessed in the cluster in increasing order (or
> even just mostly increaing order, or decreasing order,
> etc...)

Too complicated. Just testing for presence and page count
(mapped or not?) gives us more than enough info to account
for both readahead size _and_ direction (if any).

cheers,

Rik -- the flu hits, the flu hits, the flu hits -- MORE
+-------------------------------------------------------------------+
| Linux memory management tour guide. H.H.vanRiel@phys.uu.nl |
| Scouting Vries cubscout leader. http://www.phys.uu.nl/~riel/ |
+-------------------------------------------------------------------+

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