Re: Linux disk buffers -- how can we control it?

Ingo Molnar (mingo@pc7537.hil.siemens.at)
Wed, 26 Nov 1997 14:47:18 +0100 (MET)


On Wed, 26 Nov 1997, Rik van Riel wrote:

> On Tue, 25 Nov 1997, Pavel Machek wrote:
>
> > > Send Linux memory-management wishes to me: I'm currently looking
> > > for something to hack...
> > Did you think about making linux swapper look after access patterns?
> > It might help *VERY* much in case swap is actually needed. What do you
> > think?
>
> This might be a great win in performance, but I don't have a clue
> as to how to implement this...

i have implemented this recently, it's a 'swapin-predictor', completely
kernel-based, it's similar to CPU branch prediction. It monitors per-vma
swapin addresses, and maintains an array 'probable next swapin' pointers
and probability counters. It does improve the speed of linear trashing
_alot_ ;) (from 80K/sec to disk speed) Not that linear trashing is a good
thing.

i've got to clean it up. I also have a hack that flips two-page COW pages
when doing the COW-copy, to get better cache utilization on
non-write-allocate CPUs... although i still fail to see any measureable
advantage.

-- mingo