[PATCH] nvmet: pci-epf: Keep completion queues mapped
Christoph Hellwig
hch at lst.de
Wed Mar 12 23:32:16 PDT 2025
On Thu, Mar 13, 2025 at 10:12:06AM +0900, Damien Le Moal wrote:
> Instead of mapping and unmapping the completion queues memory to the
> host PCI address space whenever nvmet_pci_epf_cq_work() is called, map
> a completion queue to the host PCI address space when the completion
> queue is created with nvmet_pci_epf_create_cq() and unmap it when the
> completion queue is deleted with nvmet_pci_epf_delete_cq().
Yeah, that sounds much more sensible..
> +
> +static inline void nvmet_pci_epf_unmap_queue(struct nvmet_pci_epf_ctrl *ctrl,
> + struct nvmet_pci_epf_queue *queue)
> +{
> + nvmet_pci_epf_mem_unmap(ctrl->nvme_epf, &queue->pci_map);
> +}
Is there much of a point in having this wrapper?
With or without it the change looks good:
Reviewed-by: Christoph Hellwig <hch at lst.de>
More information about the Linux-nvme
mailing list