Re: [PATCH] Re: PATCH: killing read_ahead[]

From: Rik van Riel (riel@conectiva.com.br)
Date: Wed Oct 25 2000 - 13:49:37 EST


On Wed, 25 Oct 2000, Jeff V. Merkey wrote:
> Rik van Riel wrote:
> > On Wed, 25 Oct 2000, Jeff V. Merkey wrote:
> >
> > > I've reviewed the patch. It's affect seems minimal and will not
> > > break NWFS as proposed -- it looks like, however, it will reduce
> > > the performance slightly of EXT2/3 with iozone for read ahead
> > > since the first section of the patch limits the read ahead
> > > window size.
> >
> > Ummm, please read it again ;)
> >
> > The patch actually /increases/ the readahead size when
> > we start to read a file from the beginning.
>
> But only if the file is smaller than MIN_READAHEAD * 2, which
> would be the case for small files (which would read the whole
> file anyway, which is how the page cache behaves today anyway).

If the file is bigger than MIN_READAHEAD * 2, we will want
to read in the file in multiple IOs anyway.

If it turns out that we read that file sequentially, then
the kernel will read in a LARGER CHUNK next time, if it
turns out that we aren't using the file sequentially, we
won't.

The point of chosing the MIN_READAHEAD * 2 cutoff is that
I want to avoid the N+1 problem, where we do an IO for the
first MIN_READAHEAD pages and have to do a separate IO for
the last 1 page...

regards,

Rik

--
"What you're running that piece of shit Gnome?!?!"
       -- Miguel de Icaza, UKUUG 2000

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

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



This archive was generated by hypermail 2b29 : Tue Oct 31 2000 - 21:00:16 EST