diff options
author | Ming Lei <ming.lei@redhat.com> | 2021-12-03 14:15:34 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-12-03 22:51:29 +0100 |
commit | 4cafe86c9267f9dd5819df946ba8c038ba958370 (patch) | |
tree | d5c2871f88972a6f2a893a4add72818d9ea9110c /block/blk-mq-sched.c | |
parent | blk-mq: pass request queue to blk_mq_run_dispatch_ops (diff) | |
download | linux-4cafe86c9267f9dd5819df946ba8c038ba958370.tar.xz linux-4cafe86c9267f9dd5819df946ba8c038ba958370.zip |
blk-mq: run dispatch lock once in case of issuing from list
It isn't necessary to call blk_mq_run_dispatch_ops() once for issuing
single request directly, and enough to do it one time when issuing from
whole list.
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20211203131534.3668411-5-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-sched.c')
-rw-r--r-- | block/blk-mq-sched.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index 0d7257848f7e..55488ba97823 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c @@ -475,7 +475,8 @@ void blk_mq_sched_insert_requests(struct blk_mq_hw_ctx *hctx, * us one extra enqueue & dequeue to sw queue. */ if (!hctx->dispatch_busy && !run_queue_async) { - blk_mq_try_issue_list_directly(hctx, list); + blk_mq_run_dispatch_ops(hctx->queue, + blk_mq_try_issue_list_directly(hctx, list)); if (list_empty(list)) goto out; } |