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

Linus Torvalds (torvalds@transmeta.com)
17 Dec 1998 06:52:50 GMT


In article <Pine.LNX.4.03.9812170121030.5325-100000@mirkwood.dummy.home>,
Rik van Riel <H.H.vanRiel@phys.uu.nl> wrote:
>
>It should be a pretty safe bet to assume that we are
>going in the direction of the lowest page counts --
>what's already mapped (and has a higher count) is
>where we came from.

Umm, the easiest hint is probably to just look at the faulting address.
We have it available, after all.

Basically, if the faulting address is at offset 0 of the page, we're
probably walking upwards. If it's in the middle, we probably have
random access. And if it is at the end, the user is probably walking
downwards.

I suspect that such a simple heuristic would be fairly accurate, and it
can be coupled with other heuristics to further increase the accuracy.

Linus

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