[RFC PATCH v3 2/3] nvme: keep nvme_command instead of pointer to it
Keith Busch
kbusch at kernel.org
Tue Mar 16 17:16:28 GMT 2021
On Tue, Mar 16, 2021 at 07:31:25PM +0530, Kanchan Joshi wrote:
> nvme_req structure originally contained a pointer to nvme_command.
> Change nvme_req structure to keep the command itself.
> This helps in avoiding hot-path memory-allocation for async-passthrough.
I have a slightly different take on how to handle pre-allocated
passthrough commands. Every transport except PCI already preallocates a
'struct nvme_command' within the pdu, so allocating another one looks
redundant. Also, it does consume quite a bit of memory for something
that is used only for the passthrough case.
I think we can solve both concerns by always using the PDU nvme_command
rather than have the transport drivers provide it. I just sent the patch
here if you can take a look. It tested fine on PCI and loop (haven't
tested any other transports).
http://lists.infradead.org/pipermail/linux-nvme/2021-March/023711.html
More information about the Linux-nvme
mailing list