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