Re: mmap/write vs read/write supprise

Eric.Schenk@dna.lth.se
Fri, 11 Jul 1997 15:26:28 +0200


mcculley@iag.net <mcculley@iag.net> writes:
>If we had madvise, the responsibility for determining the access
>pattern could be put on the application. We could still use a better
>default access pattern for mmap'd pages, though. Is the VM code
>sophisticated enough yet to take advantage of an madvise syscall?

Another approach to this would be to use a predictive algorithm
to determine which pages to prefetch. There was a neat article
on doing this in JACM recently. The idea is to use the core of
a good compression algorithm as the predictor. Apparently
this can be proved to be within a constant of the optimal
prefect strategy (i.e. the one that knows all future
fetches in advance). I don't know off hand what the real
performance of this would be like for kernel VM, but
someone ambitious with a lot of time on their hands
may want to play :)

-- 
Eric Schenk                               www: http://www.dna.lth.se/~erics
Dept. of Comp. Sci., Lund University          email: Eric.Schenk@dna.lth.se
Box 118, S-221 00 LUND, Sweden   fax: +46-46 13 10 21  ph: +46-46 222 96 38