[PATCH] libblock: Add read-ahead task

Chris Johns chrisj at rtems.org
Thu May 31 23:09:17 UTC 2012


On 31/05/12 7:23 PM, sebastian.huber at embedded-brains.de wrote:
> From: Sebastian Huber<sebastian.huber at embedded-brains.de>
>
> Read-ahead requests were previously executed in the context of the
> reading task.  This blocks the reading task until the complete read
> with read-ahead transfer is finished.  A read-ahead task is introduced
> to off-load the read-ahead transfer.  This allows the reading task to
> work with the requested block more quickly.  The read-ahead is triggered
> after two misses of ascending consecutive blocks or a read hit of a
> block read by the most-resent read-ahead transfer.

It is not clear to me the gain this change gives us. Do you have any 
performance related data that shows the improvement this change gives us ?

The ability of the reader to return quickly on a read call is important 
yet the benefit of lowering the overhead to read data is also important. 
I can see real performance gains where the driver is DMA and interrupt 
driven and SMP would also help here.

I see a more important issue, the ability of the file system to indicate 
if read-ahead is suitable. In the case of file system meta data 
management the effect of read-ahead is questionable. The same is true 
for reading for write. For reading file data the process is speculative 
and I wonder if a way to increase the read-ahead based on continued 
non-seek reading is something worth looking at. This means read-ahead 
control being moved from the cache to the file system maybe worth 
considering.

Chris



More information about the devel mailing list