diff options
author | Jens Axboe <axboe@fb.com> | 2014-10-29 18:18:26 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2014-10-29 18:18:26 +0100 |
commit | e167dfb53cb85fde7b15f644e9dbef7ba31896b6 (patch) | |
tree | baf22faa1d3de6c2a70faeacc0599f01f5469a2d /block/blk-mq.c | |
parent | blk-mq: add a 'list' parameter to ->queue_rq() (diff) | |
download | linux-e167dfb53cb85fde7b15f644e9dbef7ba31896b6.tar.xz linux-e167dfb53cb85fde7b15f644e9dbef7ba31896b6.zip |
blk-mq: add BLK_MQ_F_DEFER_ISSUE support flag
Drivers can now tell blk-mq if they take advantage of the deferred
issue through 'last' or not. If they do, don't do queue-direct
for sync IO. This is a preparation patch for the nvme conversion.
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 7e5303820452..b355b5957cd7 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1172,7 +1172,12 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio) goto run_queue; } - if (is_sync) { + /* + * If the driver supports defer issued based on 'last', then + * queue it up like normal since we can potentially save some + * CPU this way. + */ + if (is_sync && !(data.hctx->flags & BLK_MQ_F_DEFER_ISSUE)) { struct blk_mq_queue_data bd = { .rq = rq, .list = NULL, |