blk-mq: update hctx->dispatch_busy in case of real scheduler
authorMing Lei <ming.lei@redhat.com>
Fri, 25 Jun 2021 02:02:48 +0000 (10:02 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 25 Jun 2021 15:50:31 +0000 (09:50 -0600)
Commit 6e6fcbc27e77 ("blk-mq: support batching dispatch in case of io")
starts to support io batching submission by using hctx->dispatch_busy.

However, blk_mq_update_dispatch_busy() isn't changed to update hctx->dispatch_busy
in that commit, so fix the issue by updating hctx->dispatch_busy in case
of real scheduler.

Reported-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jan Kara <jack@suse.cz>
Fixes: 6e6fcbc27e77 ("blk-mq: support batching dispatch in case of io")
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20210625020248.1630497-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c

index 3115ea2d0990013e05b593f1fc12c3b3f7194918..c2f3550337f705e59381ac5665daaef31cf376bc 100644 (file)
@@ -1224,9 +1224,6 @@ static void blk_mq_update_dispatch_busy(struct blk_mq_hw_ctx *hctx, bool busy)
 {
        unsigned int ewma;
 
-       if (hctx->queue->elevator)
-               return;
-
        ewma = hctx->dispatch_busy;
 
        if (!ewma && !busy)