From: Ming Lei <ming.lei@redhat.com>
To: John Garry <john.garry@huawei.com>
Cc: Jens Axboe <axboe@kernel.dk>,
linux-block@vger.kernel.org,
Kashyap Desai <kashyap.desai@broadcom.com>
Subject: Re: [PATCH] blk-mq: test QUEUE_FLAG_HCTX_ACTIVE for sbitmap_shared in hctx_may_queue
Date: Tue, 5 Jan 2021 10:20:17 +0800 [thread overview]
Message-ID: <20210105022017.GA3594357@T590> (raw)
In-Reply-To: <f8def27f-6709-143f-9864-8bc76e4ee052@huawei.com>
On Mon, Jan 04, 2021 at 10:41:36AM +0000, John Garry wrote:
> On 27/12/2020 11:34, Ming Lei wrote:
> > In case of blk_mq_is_sbitmap_shared(), we should test QUEUE_FLAG_HCTX_ACTIVE against
> > q->queue_flags instead of BLK_MQ_S_TAG_ACTIVE.
> >
> > So fix it.
> >
> > Cc: John Garry <john.garry@huawei.com>
> > Cc: Kashyap Desai <kashyap.desai@broadcom.com>
> > Fixes: f1b49fdc1c64 ("blk-mq: Record active_queues_shared_sbitmap per tag_set for when using shared sbitmap")
> > Signed-off-by: Ming Lei <ming.lei@redhat.com>
>
> Reviewed-by: John Garry <john.garry@huawei.com>
>
> > ---
> > block/blk-mq.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/block/blk-mq.h b/block/blk-mq.h
> > index c1458d9502f1..3616453ca28c 100644
> > --- a/block/blk-mq.h
> > +++ b/block/blk-mq.h
> > @@ -304,7 +304,7 @@ static inline bool hctx_may_queue(struct blk_mq_hw_ctx *hctx,
> > struct request_queue *q = hctx->queue;
> > struct blk_mq_tag_set *set = q->tag_set;
> > - if (!test_bit(BLK_MQ_S_TAG_ACTIVE, &q->queue_flags))
> > + if (!test_bit(QUEUE_FLAG_HCTX_ACTIVE, &q->queue_flags))
>
> I wonder how this ever worked properly, as BLK_MQ_S_TAG_ACTIVE is bit index
> 1, and for q->queue_flags that means QUEUE_FLAG_DYING bit, which I figure is
> not set normally..
It always return true, and might just take a bit more CPU especially the tag queue
depth of magsas_raid and hisi_sas_v3 is quite high.
Thanks,
Ming
next prev parent reply other threads:[~2021-01-05 2:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-27 11:34 [PATCH] blk-mq: test QUEUE_FLAG_HCTX_ACTIVE for sbitmap_shared in hctx_may_queue Ming Lei
2021-01-04 10:41 ` John Garry
2021-01-05 2:20 ` Ming Lei [this message]
2021-01-05 10:04 ` John Garry
2021-01-05 11:18 ` Ming Lei
2021-01-05 11:38 ` John Garry
2021-01-06 1:28 ` Ming Lei
2021-01-06 11:38 ` John Garry
2021-01-25 2:29 ` Ming Lei
2021-01-25 4:25 ` Jens Axboe
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=20210105022017.GA3594357@T590 \
--to=ming.lei@redhat.com \
--cc=axboe@kernel.dk \
--cc=john.garry@huawei.com \
--cc=kashyap.desai@broadcom.com \
--cc=linux-block@vger.kernel.org \
/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