Re: [PATCH] fix readahead breakage for sequential after randomreads

From: Ram Pai
Date: Tue Jul 27 2004 - 10:41:37 EST


On Tue, 2004-07-27 at 00:40, Miklos Szeredi wrote:
> Ram Pai <linuxram@xxxxxxxxxx> wrote:
> >
> > Also I think the bug that Miklos, found is really hard to reproduce. Did
> > he find this bug by code inspection? Its really really hard to get into
> > a state where the current window is of size 1 page with zero pages in
> > the readahead window, and then the sequential read pattern to just right
> > then.
>
> I found it by accident. I did my testing with the following read
> sequence:
>
> page offset num pages
> 7 1
> 0 1
> 35 1
> 23 1
> 42 1
> 33 1
> 29 1
> 100 200
>
> I did not measure actual performance, but only looked at the length of
> the page vector passed to my filesystem's readpages() method.

right. this pattern is just about right to get into that bad state. Had
you had some more random reads then readahead algorithm will go into the
slow-read mode(readahead-off mode) and you will not bump into this bug.

RP

>
> Miklos
>

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