]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
blk-mq: improve scheduler queue sync/async running
authorJens Axboe <axboe@fb.com>
Thu, 26 Jan 2017 19:28:10 +0000 (12:28 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 27 Jan 2017 15:20:30 +0000 (08:20 -0700)
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>
block/blk-mq.c

index ede835c2b08baa0fc8f1ded85ac877c73dd2b5df..1f948d5c2715bb666016078b9626d8ce0483e575 100644 (file)
@@ -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)) {
@@ -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)) {