]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvmet: pci-epf: Keep completion queues mapped
authorDamien Le Moal <dlemoal@kernel.org>
Thu, 13 Mar 2025 08:22:18 +0000 (17:22 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:12:17 +0000 (11:12 +0200)
commitbd5c4e9fdfc1f3302d62f645727dc4f7ded351c4
tree2800e42bcc41de7a6472d1e07f538fab47afceaf
parent0e21e99bcdb33896b8e8e27bdb8557affe61be90
nvmet: pci-epf: Keep completion queues mapped

[ Upstream commit ea7789c1541084a3dae65ffd36778348dd98f61b ]

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().

This removes the completion queue mapping/unmapping from
nvmet_pci_epf_cq_work() and significantly increases performance. For
a single job 4K random read QD=1 workload, the IOPS is increased from
23 KIOPS to 25 KIOPS. Some significant throughput increasde for high
queue depth and large IOs workloads can also be seen.

Since the functions nvmet_pci_epf_map_queue() and
nvmet_pci_epf_unmap_queue() are called respectively only from
nvmet_pci_epf_create_cq() and nvmet_pci_epf_delete_cq(), these functions
are removed and open-coded in their respective call sites.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Stable-dep-of: 85adf2094abb ("nvmet: pci-epf: clear completion queue IRQ flag on delete")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/target/pci-epf.c