[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[dm-devel] Re: Why does __do_page_cache_readahead submit READ, not READA?

On Wed, Jul 29 2009, Lars Ellenberg wrote:
> I naively assumed, from the "readahead" in the name, that readahead
> would be submitting READA bios. It does not.
> I recently did some statistics on how many READ and READA requests
> we actually see on the block device level.
> I was suprised that READA is basically only used for file system
> internal meta data (and not even for all file systems),
> but _never_ for file data.
> A simple
> 	dd if=bigfile of=/dev/null bs=4k count=1
> will absolutely cause readahead of the configured amount, no problem.
> But on the block device level, these are READ requests, where I'd
> expected them to be READA requests, based on the name.
> This is because __do_page_cache_readahead() calls read_pages(),
> which in turn is mapping->a_ops->readpages(), or, as fallback,
> mapping->a_ops->readpage().
> On that level, all variants end up submitting as READ.
> This may even be intentional.
> But if so, I'd like to understand that.

I don't think it's intentional, and if memory serves, we used to use
READA when submitting read-ahead. Not sure how best to improve the
situation, since (as you describe), we lose the read-ahead vs normal
read at that level. I did some experimentation some time ago for
flagging this, see:


which should pass down READA properly.

Jens Axboe

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]