Re: [RFC RESEND 16/16] nvme-pci: use blk_rq_dma_map() for NVMe SGL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 05.05.24 15:23, Leon Romanovsky wrote:
On Fri, May 03, 2024 at 04:41:21PM +0200, Zhu Yanjun wrote:
On 05.03.24 12:18, Leon Romanovsky wrote:
From: Chaitanya Kulkarni <kch@xxxxxxxxxx>
<...>

This is an RFC to demonstrate the newly added DMA APIs can be used to
map/unmap bvecs without the use of sg list, hence I've modified the pci
code to only handle SGLs for now. Once we have some agreement on the
structure of new DMA API I'll add support for PRPs along with all the
optimization that I've removed from the code for this RFC for NVMe SGLs
and PRPs.

<...>

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index e6267a6aa380..140939228409 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -236,7 +236,9 @@ struct nvme_iod {
   	unsigned int dma_len;	/* length of single DMA segment mapping */
   	dma_addr_t first_dma;
   	dma_addr_t meta_dma;
-	struct sg_table sgt;
+	struct dma_iova_attrs iova;
+	dma_addr_t dma_link_address[128];
Why the length of this array is 128? Can we increase this length of the
array?
It is combination of two things:
  * Good enough value for this nvme RFC to pass simple test, which Chaitanya did.
  * Output of various NVME_CTRL_* defines

Thanks a lot. I enlarged this number to 512. It seems that it can work. Hope this will increase the performance.

Best Regards,

Zhu Yanjun


Thanks

--
Best Regards,
Yanjun.Zhu





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux