[LWN Logo]
[LWN.net]
From:	 Rik van Riel <riel@conectiva.com.br>
To:	 Daniel Phillips <phillips@bonn-fries.net>
Subject: Re: [resent PATCH] Re: very slow parallel read performance
Date:	 Fri, 24 Aug 2001 20:10:06 -0300 (BRST)
Cc:	 Roger Larsson <roger.larsson@skelleftea.mail.telia.com>,
	 "Marc A. Lehmann" <pcg@goof.com>, <linux-kernel@vger.kernel.org>,
	 <oesi@plan9.de>

On Sat, 25 Aug 2001, Daniel Phillips wrote:
> On August 24, 2001 09:02 pm, Rik van Riel wrote:

> > I guess in the long run we should have automatic collapse
> > of the readahead window when we find that readahead window
> > thrashing is going on,
>
> Yes, and the most effective way to detect that the readahead
> window is too high is by keeping a history of recently evicted
> pages.

I think it could be even easier. We simply count for each
file how many pages we read-ahead and how many pages we
read.

If the number of pages being read-ahead is really a lot
higher than the pages being read, we know pages get evicted
before we read them ==> we shrink the readahead window.

This simpler scheme should also be able to correctly set
the readahead window for slower data streams to smaller
than the readahead window size for faster reading data
streams (which _do_ get to use more of their data before
it is evicted again).

regards,

Rik
--
IA64: a worthy successor to the i860.

		http://www.surriel.com/
http://www.conectiva.com/	http://distro.conectiva.com/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/