From: Chao Leng <lengchao@huawei.com>
To: Sagi Grimberg <sagi@grimberg.me>, Christoph Hellwig <hch@lst.de>
Cc: <linux-nvme@lists.infradead.org>, <linux-block@vger.kernel.org>,
<kbusch@kernel.org>, <axboe@kernel.dk>
Subject: Re: [PATCH 0/3] improve nvme quiesce time for large amount of namespaces
Date: Mon, 1 Aug 2022 09:45:57 +0800 [thread overview]
Message-ID: <9e9fa597-aab1-ca76-0ac6-e2bfafaa4c87@huawei.com> (raw)
In-Reply-To: <fc7a303f-0921-f784-a559-f03511f2e4be@grimberg.me>
On 2022/7/31 18:23, Sagi Grimberg wrote:
>
>>> Why can't we have a per-tagset quiesce flag and just wait for the
>>> one? That also really nicely supports the problem with changes in
>>> the namespace list during that time.
>> Because If quiesce queues based on tagset, it is difficult to
>> distinguish non-IO queues. The I/O queues process is different
>> from other queues such as fabrics_q, admin_q, etc, which may cause
>> confusion in the code logic.
>
> It is primarily the connect_q where we issue io queue connect...
> We should not quiesce the connect_q in nvme_stop_queues() as that
> relates to only namespaces queues.
Although we can do special processing for connect_q, fabrics_q, admin_q,
but this results in redundant semantics being implemented in
nvme_xxx_teardown_io_queues, these actions are confused for
nvme_xxx_teardown_admin_queue. It doesn't look clear.
Therefor, I think quiesceing queues based on namespaces is a better option.
In addition, I do not see the benefit of quiesceing queues based on tagset.
>
> In the last attempt to do a tagset flag, we ended up having to do
> something like:
> --
> void nvme_stop_queues(struct nvme_ctrl *ctrl)
> {
> blk_mq_quiesce_tagset(ctrl->tagset);
> if (ctrl->connect_q)
> blk_mq_unquiesce_queue(ctrl->connect_q);
> }
> EXPORT_SYMBOL_GPL(nvme_stop_queues);
> --
>
> But maybe we can avoid that, and because we allocate
> the connect_q ourselves, and fully know that it should
> not be apart of the tagset quiesce, perhaps we can introduce
> a new interface like:
> --
> static inline int nvme_ctrl_init_connect_q(struct nvme_ctrl *ctrl)
> {
> ctrl->connect_q = blk_mq_init_queue_self_quiesce(ctrl->tagset);
> if (IS_ERR(ctrl->connect_q))
> return PTR_ERR(ctrl->connect_q);
> return 0;
> }
> --
>
> And then blk_mq_quiesce_tagset can simply look into a per request-queue
> self_quiesce flag and skip as needed.
> .
next prev parent reply other threads:[~2022-08-01 1:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-29 7:39 [PATCH 0/3] improve nvme quiesce time for large amount of namespaces Chao Leng
2022-07-29 7:39 ` [PATCH 1/3] blk-mq: delete unnecessary comments Chao Leng
2022-07-29 7:39 ` [PATCH 2/3] nvme: improve the quiesce time for non blocking transports Chao Leng
2022-07-29 7:39 ` [PATCH 3/3] nvme: improve the quiesce time for " Chao Leng
2022-07-29 14:26 ` [PATCH 0/3] improve nvme quiesce time for large amount of namespaces Christoph Hellwig
2022-07-30 0:39 ` Chao Leng
2022-07-31 10:23 ` Sagi Grimberg
2022-08-01 1:45 ` Chao Leng [this message]
2022-08-02 13:38 ` Christoph Hellwig
2022-10-10 8:46 ` Chao Leng
2022-10-12 6:37 ` Sagi Grimberg
2022-10-12 8:43 ` Chao Leng
2022-10-12 11:13 ` Sagi Grimberg
2022-10-13 1:37 ` Chao Leng
2022-10-13 2:06 ` Chao Leng
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=9e9fa597-aab1-ca76-0ac6-e2bfafaa4c87@huawei.com \
--to=lengchao@huawei.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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