Re: [PATCH] fix readahead pipeline break caused by block plug

From: Jeff Moyer
Date: Wed Feb 01 2012 - 15:13:45 EST

Vivek Goyal <vgoyal@xxxxxxxxxx> writes:

> On Wed, Feb 01, 2012 at 04:18:07AM -0500, Christoph Hellwig wrote:
>> On Tue, Jan 31, 2012 at 10:36:53PM -0500, Vivek Goyal wrote:
>> > I still see that IO is being submitted one page at a time. The only
>> > real difference seems to be that queue unplug happening at random times
>> > and many a times we are submitting much smaller requests (40 sectors, 48
>> > sectors etc).
>> This is expected given that the block device node uses
>> block_read_full_page, and not mpage_readpage(s).
> What is the difference between block_read_full_page() and
> mpage_readpage(). IOW, why block device does not use mpage_readpage(s)
> interface?
> Is enabling mpage_readpages() on block devices is as simple as following
> patch or more is involved? (I suspect it has to be more than this. If it
> was this simple, it would have been done by now).
> This patch complies and seems to work. (system does not crash and dd
> seems to be working. I can't verify the contents of the file though).
> Applying following patch improved the speed from 110MB/s to more than
> 230MB/s.
> # dd if=/dev/sdb of=/dev/null bs=1M count=1K
> 1024+0 records in
> 1024+0 records out
> 1073741824 bytes (1.1 GB) copied, 4.6269 s, 232 MB/s

commit db2dbb12dc47a50c7a4c5678f526014063e486f6
Author: Jeff Moyer <jmoyer@xxxxxxxxxx>
Date: Wed Apr 22 14:08:13 2009 +0200

block: implement blkdev_readpages

Doing a proper block dev ->readpages() speeds up the crazy dump(8)
approach of using interleaved process IO.

Signed-off-by: Jeff Moyer <jmoyer@xxxxxxxxxx>
Signed-off-by: Jens Axboe <jens.axboe@xxxxxxxxxx>


commit 172124e220f1854acc99ee394671781b8b5e2120
Author: Jens Axboe <jens.axboe@xxxxxxxxxx>
Date: Thu Jun 4 22:34:44 2009 +0200

Revert "block: implement blkdev_readpages"

This reverts commit db2dbb12dc47a50c7a4c5678f526014063e486f6.

It apparently causes problems with partition table read-ahead
on archs with large page sizes. Until that problem is diagnosed
further, just drop the readpages support on block devices.

Signed-off-by: Jens Axboe <jens.axboe@xxxxxxxxxx>


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at