Skip to content

Commit 9e82d35

Browse files
Christoph Hellwigaxboe
authored andcommitted
aoe: set an optimal I/O size
aoe forces a larger readahead size, but any reason to do larger I/O is not limited to readahead. Also set the optimal I/O size, and remove the local constants in favor of just using SZ_2G. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 5d4ce78 commit 9e82d35

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/block/aoe/aoeblk.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,6 @@ aoeblk_gdalloc(void *vp)
347347
mempool_t *mp;
348348
struct request_queue *q;
349349
struct blk_mq_tag_set *set;
350-
enum { KB = 1024, MB = KB * KB, READ_AHEAD = 2 * MB, };
351350
ulong flags;
352351
int late = 0;
353352
int err;
@@ -407,7 +406,8 @@ aoeblk_gdalloc(void *vp)
407406
WARN_ON(d->gd);
408407
WARN_ON(d->flags & DEVFL_UP);
409408
blk_queue_max_hw_sectors(q, BLK_DEF_MAX_SECTORS);
410-
q->backing_dev_info->ra_pages = READ_AHEAD / PAGE_SIZE;
409+
q->backing_dev_info->ra_pages = SZ_2M / PAGE_SIZE;
410+
blk_queue_io_opt(q, SZ_2M);
411411
d->bufpool = mp;
412412
d->blkq = gd->queue = q;
413413
q->queuedata = d;

0 commit comments

Comments
 (0)