Skip to content

Commit

Permalink
blk-mq: improve scheduler queue sync/async running
Browse files Browse the repository at this point in the history
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: Jens Axboe <axboe@fb.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Tested-by: Hannes Reinecke <hare@suse.com>
  • Loading branch information
axboe committed Jan 27, 2017
1 parent 4a46f05 commit 0abad77
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions block/blk-mq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,8 @@ static blk_qc_t blk_mq_make_request(struct request_queue *q, struct bio *bio)
if (q->elevator) {
blk_mq_put_ctx(data.ctx);
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;
}
if (!blk_mq_merge_queue_io(data.hctx, data.ctx, rq, bio)) {
Expand Down Expand Up @@ -1585,7 +1586,8 @@ static blk_qc_t blk_sq_make_request(struct request_queue *q, struct bio *bio)
if (q->elevator) {
blk_mq_put_ctx(data.ctx);
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;
}
if (!blk_mq_merge_queue_io(data.hctx, data.ctx, rq, bio)) {
Expand Down

0 comments on commit 0abad77

Please sign in to comment.