From: Dmitry Bogdanov <d.bogdanov@yadro.com>
To: Caleb Sander <csander@purestorage.com>
Cc: Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Chaitanya Kulkarni <kch@nvidia.com>,
James Smart <james.smart@broadcom.com>,
<linux-nvme@lists.infradead.org>, <linux@yadro.com>
Subject: Re: [PATCH 7/7] nvme: allow send fused commands
Date: Fri, 13 Sep 2024 14:20:51 +0300 [thread overview]
Message-ID: <20240913112051.GA22571@yadro.com> (raw)
In-Reply-To: <CADUfDZpUJEhowQRis0u==4cKkQPbm7mJJvg6TsaZ-myfFSATJg@mail.gmail.com>
Hi,
> There is prior discussion about exactly this change at
> https://github.com/linux-nvme/nvme-cli/issues/318. The concerns raised
> there still appear valid 6 years later. The main issue is that this
> interface requires 2 separate ioctls/io_uring operations to submit a
> Fused Compare and Write. That means the 2 commands could be submitted
> to different I/O queues, which wouldn't work. Not to mention that 2
> threads are required in order to submit the commands concurrently if
> the blocking ioctls are used. Additionally, another application using
> the NVMe controller concurrently could submit a command in between the
> fused commands, which would also break the Fused Compare and Write.
This patch is not for a production usage of Fused commands from the host,
but instead it is just for the purpose to test the target side. Of course,
it has some limitations like working only with one IO queue and one
user, but all of that is under the user's control:
# nvme connect-all -i 1 -t tcp
# nvme io-passthru --o 0x5 -n 1 -f 0x1 -w --cdw10=0 --cdw12=0x0 -l 4096 -i ./4k0 /dev/nvme0n1 & nvme io-passthru --o 0x1 -n 1 -f 0x2 -w --cdw10=0 --cdw12=0x0 -l 4096 -i ./4k1 /dev/nvme0n1
NVMe command result:00000000
NVMe command result:00000000
And the patch provides enough kernel functionality to test the target side.
>
> FYI there was a set of patches sent to the mailing list
> https://lore.kernel.org/linux-nvme/20210105224939.1336-1-clay.mayers@kioxia.com/T/#u
> that attempted to implement a new passthru ioctl for submitting fused
> commands. But it adds memory overhead to each NVMe request and there
> are a lot of corner cases to consider around error handling.
>
> As an implementer of Fused Compare and Write on the target side, I can
> say the concept of "fused commands" is pretty horrible to work with.
> It breaks the model where each NVMe command is an independent
> operation and requires a ton of additional error propagation logic.
> Not to mention that the NSID, SLBA, and NLB parameters are now
> duplicated between the 2 commands... As far as I can tell, the only
> reason to make the operation 2 commands is to allow a separate PRP/SGL
> for each command. I guess this avoids the memcpy that would be
> required if a single concatenated data buffer was used? But at what
> cost???
>
> On Wed, Sep 11, 2024 at 11:45 PM Dmitry Bogdanov <d.bogdanov@yadro.com> wrote:
> >
> > Allow a user to pass fused flags for the commands.
> >
> > Signed-off-by: Dmitry Bogdanov <d.bogdanov@yadro.com>
prev parent reply other threads:[~2024-09-13 11:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-12 6:42 [PATCH 0/7] nvmet: support of Fused operations Dmitry Bogdanov
2024-09-12 6:42 ` [PATCH 1/7] nvmet: add support of Compare command Dmitry Bogdanov
2024-09-12 6:42 ` [PATCH 2/7] nvmet: bdev: " Dmitry Bogdanov
2024-09-12 6:42 ` [PATCH 3/7] nvmet: file: " Dmitry Bogdanov
2024-09-12 6:42 ` [PATCH 4/7] Revert "nvmet: Open code nvmet_req_execute()" Dmitry Bogdanov
2024-09-12 6:42 ` [PATCH 5/7] nvmet: add support of fused operations Dmitry Bogdanov
2024-09-12 6:42 ` [PATCH 6/7] nvmet: make fused commands be atomic Dmitry Bogdanov
2024-09-12 6:42 ` [PATCH 7/7] nvme: allow send fused commands Dmitry Bogdanov
2024-09-12 16:36 ` Caleb Sander
2024-09-13 11:20 ` Dmitry Bogdanov [this message]
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=20240913112051.GA22571@yadro.com \
--to=d.bogdanov@yadro.com \
--cc=csander@purestorage.com \
--cc=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=kch@nvidia.com \
--cc=linux-nvme@lists.infradead.org \
--cc=linux@yadro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.