Commit 0abad774 authored by Jens Axboe's avatar Jens Axboe

blk-mq: improve scheduler queue sync/async running

We'll use the same criteria for whether we need to run the queue sync
or async when we have a scheduler, as we do without one.
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
Reviewed-by: default avatarOmar Sandoval <osandov@fb.com>
Tested-by: default avatarHannes Reinecke <hare@suse.com>
parent 4a46f05e
...@@ -1476,7 +1476,8 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio) ...@@ -1476,7 +1476,8 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
if (q->elevator) { if (q->elevator) {
blk_mq_put_ctx(data.ctx); blk_mq_put_ctx(data.ctx);
blk_mq_bio_to_request(rq, bio); blk_mq_bio_to_request(rq, bio);
blk_mq_sched_insert_request(rq, false, true, true); blk_mq_sched_insert_request(rq, false, true,
!is_sync || is_flush_fua);
goto done; goto done;
} }
if (!blk_mq_merge_queue_io(data.hctx, data.ctx, rq, bio)) { if (!blk_mq_merge_queue_io(data.hctx, data.ctx, rq, bio)) {
...@@ -1585,7 +1586,8 @@ static blk_qc_t blk_sq_make_request(struct request_queue *q, struct bio *bio) ...@@ -1585,7 +1586,8 @@ static blk_qc_t blk_sq_make_request(struct request_queue *q, struct bio *bio)
if (q->elevator) { if (q->elevator) {
blk_mq_put_ctx(data.ctx); blk_mq_put_ctx(data.ctx);
blk_mq_bio_to_request(rq, bio); blk_mq_bio_to_request(rq, bio);
blk_mq_sched_insert_request(rq, false, true, true); blk_mq_sched_insert_request(rq, false, true,
!is_sync || is_flush_fua);
goto done; goto done;
} }
if (!blk_mq_merge_queue_io(data.hctx, data.ctx, rq, bio)) { if (!blk_mq_merge_queue_io(data.hctx, data.ctx, rq, bio)) {
......
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