Commit 9e82d35b authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 5d4ce78b
...@@ -347,7 +347,6 @@ aoeblk_gdalloc(void *vp) ...@@ -347,7 +347,6 @@ aoeblk_gdalloc(void *vp)
mempool_t *mp; mempool_t *mp;
struct request_queue *q; struct request_queue *q;
struct blk_mq_tag_set *set; struct blk_mq_tag_set *set;
enum { KB = 1024, MB = KB * KB, READ_AHEAD = 2 * MB, };
ulong flags; ulong flags;
int late = 0; int late = 0;
int err; int err;
...@@ -407,7 +406,8 @@ aoeblk_gdalloc(void *vp) ...@@ -407,7 +406,8 @@ aoeblk_gdalloc(void *vp)
WARN_ON(d->gd); WARN_ON(d->gd);
WARN_ON(d->flags & DEVFL_UP); WARN_ON(d->flags & DEVFL_UP);
blk_queue_max_hw_sectors(q, BLK_DEF_MAX_SECTORS); blk_queue_max_hw_sectors(q, BLK_DEF_MAX_SECTORS);
q->backing_dev_info->ra_pages = READ_AHEAD / PAGE_SIZE; q->backing_dev_info->ra_pages = SZ_2M / PAGE_SIZE;
blk_queue_io_opt(q, SZ_2M);
d->bufpool = mp; d->bufpool = mp;
d->blkq = gd->queue = q; d->blkq = gd->queue = q;
q->queuedata = d; q->queuedata = d;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment