Hi

Xuan Baldauf wrote:

> Is there already a "smart readahead" that does readahead on the logical and not 
>physical layer? E.g. if
> there a file which is fragmented, readahead should not read beyond a fragment, but 
>it should read the
> next fragment ahead.

Yes, generic_fileread never reads blocks which are not in a file. If desired page is 
not available
immideately - it tries to schedule reading of several contiguos blocks of file 
regardless to how far they
are from each other.

Thanks,
vs


> The same applies for directories.
>
> Maybe there should be a parameter to regulate when reiserfs schedules under load. 
>For example, this
> could be a time measured in microseconds or nanoseconds. When reiserfs calls 
>conditional_schedule(), it
> calls schedule(), and sets the time which is the lower limit of the time when the 
>next schedule() should
> be called by conditional_schedule() by using the current time and adding the delay. 
>On the next call to
> schedule(), the delay may not be exceeded. In this case, conditional_schedule() 
>returns instead of
> calling schedule().
>
> As long as this does not lead to spinning, I think this is a practical solution.
>
> Another solution can be to use the "logical read ahead" by predicting what blocks 
>will be likely to be
> read next, and giving this information to the elevator and then calling schedule(). 
>If it is a good
> elevator, it will merge the request of the parallel processes into one large 
>optimized elevator walk.
> The time schedule() returns, the data needed can already be in memory.
>
> Maybe there should also be a kind of "good prediction feedback". If the read ahead 
>prediction is good,
> the number of blocks used for prediction should be enlarged. If it is bad, the 
>number of predicted
> blocks should be shrinked. This feedback algorithm would make bulk transfers faster 
>while random
> accesses do not consume unneccessary readahead.
>
> >
> >
> > Hans
>
> Xu�n.

Reply via email to