All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>, Sagi Grimberg <sagi@grimberg.me>,
	Chaitanya Kulkarni <kch@nvidia.com>,
	Kanchan Joshi <joshi.k@samsung.com>,
	Leon Romanovsky <leon@kernel.org>,
	Nitesh Shetty <nj.shetty@samsung.com>,
	Logan Gunthorpe <logang@deltatee.com>,
	linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
	Leon Romanovsky <leonro@nvidia.com>
Subject: Re: [PATCH 2/8] block: add scatterlist-less DMA mapping helpers
Date: Mon, 23 Jun 2025 09:43:20 -0600	[thread overview]
Message-ID: <aFl2GJskYNdvZDDo@kbusch-mbp> (raw)
In-Reply-To: <20250623141259.76767-3-hch@lst.de>

On Mon, Jun 23, 2025 at 04:12:24PM +0200, Christoph Hellwig wrote:
> Add a new blk_rq_dma_map / blk_rq_dma_unmap pair that does away with
> the wasteful scatterlist structure.  Instead it uses the mapping iterator
> to either add segments to the IOVA for IOMMU operations, or just maps
> them one by one for the direct mapping.  For the IOMMU case instead of
> a scatterlist with an entry for each segment, only a single [dma_addr,len]
> pair needs to be stored for processing a request, and for the direct
> mapping the per-segment allocation shrinks from
> [page,offset,len,dma_addr,dma_len] to just [dma_addr,len].
> 
> One big difference to the scatterlist API, which could be considered
> downside, is that the IOVA collapsing only works when the driver sets
> a virt_boundary that matches the IOMMU granule.  For NVMe this is done
> already so it works perfectly.

Looks good.

Reviewed-by: Keith Busch <kbusch@kernel.org>

  reply	other threads:[~2025-06-23 15:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-23 14:12 new DMA API conversion for nvme-pci v2 Christoph Hellwig
2025-06-23 14:12 ` [PATCH 1/8] block: don't merge different kinds of P2P transfers in a single bio Christoph Hellwig
2025-06-23 15:43   ` Keith Busch
2025-06-23 14:12 ` [PATCH 2/8] block: add scatterlist-less DMA mapping helpers Christoph Hellwig
2025-06-23 15:43   ` Keith Busch [this message]
2025-06-23 14:12 ` [PATCH 3/8] nvme-pci: refactor nvme_pci_use_sgls Christoph Hellwig
2025-06-23 15:27   ` Keith Busch
2025-06-24 12:46     ` Christoph Hellwig
2025-06-25  4:28       ` Chaitanya Kulkarni
2025-06-25  6:07         ` Christoph Hellwig
2025-06-23 14:12 ` [PATCH 4/8] nvme-pci: merge the simple PRP and SGL setup into a common helper Christoph Hellwig
2025-06-23 15:43   ` Keith Busch
2025-06-23 14:12 ` [PATCH 5/8] nvme-pci: remove superfluous arguments Christoph Hellwig
2025-06-23 14:12 ` [PATCH 6/8] nvme-pci: convert the data mapping to blk_rq_dma_map Christoph Hellwig
2025-06-23 15:44   ` Keith Busch
2025-06-23 14:12 ` [PATCH 7/8] nvme-pci: replace NVME_MAX_KB_SZ with NVME_MAX_BYTE Christoph Hellwig
2025-06-23 15:44   ` Keith Busch
2025-06-23 14:12 ` [PATCH 8/8] nvme-pci: rework the build time assert for NVME_MAX_NR_DESCRIPTORS Christoph Hellwig
2025-06-23 15:44   ` Keith Busch
2025-06-23 21:45 ` new DMA API conversion for nvme-pci v2 Chaitanya Kulkarni
2025-06-25  4:32   ` Chaitanya Kulkarni
  -- strict thread matches above, loose matches on Subject: below --
2025-06-25 11:34 new DMA API conversion for nvme-pci v3 Christoph Hellwig
2025-06-25 11:34 ` [PATCH 2/8] block: add scatterlist-less DMA mapping helpers Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aFl2GJskYNdvZDDo@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=joshi.k@samsung.com \
    --cc=kch@nvidia.com \
    --cc=leon@kernel.org \
    --cc=leonro@nvidia.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=logang@deltatee.com \
    --cc=nj.shetty@samsung.com \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.