From: Keith Busch <kbusch@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <kbusch@meta.com>,
linux-nvme@lists.infradead.org, Leon Romanovsky <leon@kernel.org>
Subject: Re: [PATCH] nvme-pci: always use blk_map_iter for metadata
Date: Tue, 21 Oct 2025 08:42:06 -0600 [thread overview]
Message-ID: <aPebvnv3u6HWcqdX@kbusch-mbp> (raw)
In-Reply-To: <20251021071935.GA31479@lst.de>
On Tue, Oct 21, 2025 at 09:19:35AM +0200, Christoph Hellwig wrote:
> On Mon, Oct 20, 2025 at 11:24:44AM -0700, Keith Busch wrote:
> > From: Keith Busch <kbusch@kernel.org>
> >
> > The dma_map_bvec helper doesn't work for p2p data. Rather than special
> > case it, just use the same mapping logic so that the driver doesn't need
> > to consider memory types.
>
> We already consider the memory types for the data path, so treating the
> metadasta path where p2p is even more unlikely sounds like the wrong
> tradeoff.
Maybe the data path should only use blk_dma_iter too. Is dma_map_bvec
that much faster for the single vector case? I'm going to test both on
real hardware and see if there's a difference in CPU utilization or
latency.
> If we have a single segment we just need a single
> is_pci_p2pdma_page check to skip direct mapping path. Something like
> this untested patch:
The logic you used isn't accurate, but I know what you mean. I'll spin a
more minimal v2 patch.
next prev parent reply other threads:[~2025-10-21 14:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 18:24 [PATCH] nvme-pci: always use blk_map_iter for metadata Keith Busch
2025-10-20 23:38 ` Chaitanya Kulkarni
2025-10-21 7:19 ` Christoph Hellwig
2025-10-21 14:42 ` Keith Busch [this message]
2025-10-26 7:25 ` Leon Romanovsky
2025-10-27 7:13 ` Christoph Hellwig
2025-10-27 16:09 ` Keith Busch
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=aPebvnv3u6HWcqdX@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=hch@lst.de \
--cc=kbusch@meta.com \
--cc=leon@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox