From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Keith Busch <kbusch@meta.com>,
linux-block@vger.kernel.org, linux-nvme@lists.infradead.org,
axboe@kernel.dk, leonro@nvidia.com
Subject: Re: [PATCHv2 1/7] blk-mq-dma: move the bio and bvec_iter to blk_dma_iter
Date: Tue, 22 Jul 2025 07:53:39 +0200 [thread overview]
Message-ID: <20250722055339.GB13634@lst.de> (raw)
In-Reply-To: <aH74XluC0BnerBaQ@kbusch-mbp>
On Mon, Jul 21, 2025 at 08:33:02PM -0600, Keith Busch wrote:
> On Mon, Jul 21, 2025 at 09:42:23AM +0200, Christoph Hellwig wrote:
> > On Sun, Jul 20, 2025 at 11:40:34AM -0700, Keith Busch wrote:
> > > From: Keith Busch <kbusch@kernel.org>
> > >
> > > The req_iterator just happens to have a similar fields to what the dma
> > > iterator needs, but we're not necessarily iterating a bio_vec here. Have
> > > the dma iterator define its private fields directly. It also helps to
> > > remove eyesores like "iter->iter.iter".
> >
> > Going back to this after looking at the later patches. The level
> > for which this iter exists is only called blk_map_* as there is
> > nothing dma specific about, just mapping to physical addresses.
> >
> > So maybe call it blk_map_iter instead?
>
> But the structure yields "dma_addr_t" type values to the consumer.
> Whether those are physical addresses or remapped io virtual addresses,
> they're still used for direct memory access, so I think the name as-is
> is a pretty good fit.
There's two layers:
The lower layer implemented by blk_map_iter_next just yields a phys_vec.
The upper layer built on top does the dma mapping in case of the new
blk_rq_dma_map_iter_start / blk_rq_dma_map_iter_next API. But in case of
the old __blk_rq_map_sg API it doesn't even directly do the DMA mapping
yet. And some drivers at least historically used the blk_map_sg without
then doing a DMA mapping, either for MMIO or platform specific things
using physical address. My hope was to eventually migrate them to use
blk_map_iter_next.
next prev parent reply other threads:[~2025-07-22 5:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-20 18:40 [PATCHv2 0/7] blk dma iter for metadata Keith Busch
2025-07-20 18:40 ` [PATCHv2 1/7] blk-mq-dma: move the bio and bvec_iter to blk_dma_iter Keith Busch
2025-07-21 7:37 ` Christoph Hellwig
2025-07-21 7:42 ` Christoph Hellwig
2025-07-22 2:33 ` Keith Busch
2025-07-22 5:53 ` Christoph Hellwig [this message]
2025-07-20 18:40 ` [PATCHv2 2/7] blk-mq-dma: set the bvec being iterated Keith Busch
2025-07-21 7:38 ` Christoph Hellwig
2025-07-20 18:40 ` [PATCHv2 3/7] blk-mq-dma: require unmap caller provide p2p map type Keith Busch
2025-07-21 7:39 ` Christoph Hellwig
2025-07-20 18:40 ` [PATCHv2 4/7] blk-mq: remove REQ_P2PDMA flag Keith Busch
2025-07-21 7:39 ` Christoph Hellwig
2025-07-20 18:40 ` [PATCHv2 5/7] blk-mq-dma: move common dma start code to a helper Keith Busch
2025-07-21 7:40 ` Christoph Hellwig
2025-07-20 18:40 ` [PATCHv2 6/7] blk-mq-dma: add support for mapping integrity metadata Keith Busch
2025-07-20 22:51 ` kernel test robot
2025-07-21 3:18 ` kernel test robot
2025-07-21 7:46 ` Christoph Hellwig
2025-07-20 18:40 ` [PATCHv2 7/7] nvme: convert metadata mapping to dma iter Keith Busch
2025-07-21 7:50 ` Christoph Hellwig
2025-07-21 13:15 ` Keith Busch
2025-07-22 5:49 ` 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=20250722055339.GB13634@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=kbusch@kernel.org \
--cc=kbusch@meta.com \
--cc=leonro@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
/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.