From: Jan Kara <jack@suse.cz>
To: Ming Lei <ming.lei@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>, Christoph Hellwig <hch@lst.de>,
linux-block@vger.kernel.org, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] blk-mq: update hctx->dispatch_busy in case of real scheduler
Date: Fri, 28 May 2021 14:26:31 +0200 [thread overview]
Message-ID: <20210528122631.GA28653@quack2.suse.cz> (raw)
In-Reply-To: <20210528032055.2242080-1-ming.lei@redhat.com>
On Fri 28-05-21 11:20:55, Ming Lei wrote:
> 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>
> Fixes: 6e6fcbc27e77 ("blk-mq: support batching dispatch in case of io")
> Signed-off-by: Ming Lei <ming.lei@redhat.com>
> ---
> block/blk-mq.c | 3 ---
> 1 file changed, 3 deletions(-)
Looks good to me. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
BTW: Do you plan to submit also your improvement to
__blk_mq_do_dispatch_sched() to update dispatch_busy during the fetching
requests from the scheduler to avoid draining all requests from the IO
scheduler?
Honza
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index f11d4018ce2e..4930f7119f22 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -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)
> --
> 2.29.2
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2021-05-28 12:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 3:20 [PATCH] blk-mq: update hctx->dispatch_busy in case of real scheduler Ming Lei
2021-05-28 12:26 ` Jan Kara [this message]
2021-05-31 1:37 ` Ming Lei
2021-05-31 12:04 ` Jan Kara
2021-06-01 10:01 ` Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210528122631.GA28653@quack2.suse.cz \
--to=jack@suse.cz \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=ming.lei@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox