From: John Meneghini <jmeneghi@redhat.com>
To: Keith Busch <kbusch@kernel.org>
Cc: sagi@grimberg.me, emilne@redhat.com, hare@kernel.org,
kbusch@meta.com, linux-nvme@lists.infradead.org,
mlombard@redhat.com
Subject: Re: [PATCH v2 7/7] nvme: add reserved ioq tags for cancel
Date: Wed, 26 Jun 2024 15:20:08 -0400 [thread overview]
Message-ID: <fc2fd513-ab39-4d87-b2ce-e1f86bdf5d45@redhat.com> (raw)
In-Reply-To: <Znxl9kFmoJWg1S0D@kbusch-mbp.dhcp.thefacebook.com>
On 6/26/24 15:03, Keith Busch wrote:
> On Wed, Jun 26, 2024 at 02:38:19PM -0400, John Meneghini wrote:
>> If the nvme Cancel command is supported, we need to reserve 2 tags for
>> each IO queue. Note that one addition tag is reserved to account for
>> the case where this is a fabrics controller.
>
>> @@ -4580,9 +4581,13 @@ int nvme_alloc_io_tag_set(struct nvme_ctrl *ctrl, struct blk_mq_tag_set *set,
>> */
>> if (ctrl->quirks & NVME_QUIRK_SHARED_TAGS)
>> set->reserved_tags = NVME_AQ_DEPTH;
>> + else if (effects & NVME_CMD_EFFECTS_CSUPP)
>> + /* Reserve 2 X io_queue count for NVMe Cancel */
>> + set->reserved_tags = (2 * ctrl->queue_count);
>
> The reserved_tags are already per queue, no need to multiply.
Ahh, ok. I wasn't sure about this. So the tag set belongs to the controller, and is shared by all IO queues, but reserved tags
are reserved for each IO queue. Let me fix that before I begin testing this.
>> else if (ctrl->ops->flags & NVME_F_FABRICS)
>> /* Reserved for fabric connect */
>> set->reserved_tags = 1;
>
> You mentioned an addtional tags is supposed to be reserved for fabrics.
> Shouldn't this just be an "if", not an "else if", and then increment
> reserved_tags?
Yes, good point. I was thinking we don't need more than 2 tags if it's a fabric.
So you want to reserve 3 tags when both cancel and fabrics are true?
/John
next prev parent reply other threads:[~2024-06-26 19:20 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-10 16:30 [PATCH 0/5] Support for Cancel commands for host (TCP and RDMA) Maurizio Lombardi
2024-05-10 16:30 ` [PATCH 1/5] nvme: add definitions for cancel command Maurizio Lombardi
2024-05-10 16:30 ` [PATCH 2/5] nvme-core: add a function to submit a " Maurizio Lombardi
2024-05-12 14:06 ` Sagi Grimberg
2024-06-20 8:31 ` Maurizio Lombardi
2024-06-20 13:01 ` Maurizio Lombardi
2024-06-24 10:06 ` Sagi Grimberg
2024-06-26 18:38 ` [PATCH v2 7/7] nvme: add reserved ioq tags for cancel John Meneghini
2024-06-26 19:03 ` Keith Busch
2024-06-26 19:20 ` John Meneghini [this message]
2024-06-27 8:12 ` Maurizio Lombardi
2024-06-26 19:10 ` John Meneghini
2024-05-10 16:30 ` [PATCH 3/5] nvme-tcp: use the cancel command to perform an abort if target supports it Maurizio Lombardi
2024-05-10 16:30 ` [PATCH 4/5] nvme-rdma: " Maurizio Lombardi
2024-05-10 16:30 ` [donotmerge PATCH 5/5] nvmet: target support for cancel commands Maurizio Lombardi
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=fc2fd513-ab39-4d87-b2ce-e1f86bdf5d45@redhat.com \
--to=jmeneghi@redhat.com \
--cc=emilne@redhat.com \
--cc=hare@kernel.org \
--cc=kbusch@kernel.org \
--cc=kbusch@meta.com \
--cc=linux-nvme@lists.infradead.org \
--cc=mlombard@redhat.com \
--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