From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>,
axboe@kernel.dk, sagi@grimberg.me, ben.copeland@linaro.org,
leon@kernel.org, linux-nvme@lists.infradead.org,
linux-block@vger.kernel.org
Subject: Re: [PATCH] nvme-pci: fix dma unmapping when using PRPs and not using the IOVA mapping
Date: Mon, 7 Jul 2025 17:01:16 +0200 [thread overview]
Message-ID: <20250707150116.GA1939@lst.de> (raw)
In-Reply-To: <aGvZ5Xk5L66sNWJL@kbusch-mbp>
On Mon, Jul 07, 2025 at 08:29:57AM -0600, Keith Busch wrote:
> Given it works fine for SGL, how do you feel about unconditionally
> creating an NVMe SGL, and then call some "nvme_sgl_to_prp()" helper only
> when needed? This means we only have one teardown path that matches the
> setup.
I briefly thought about it and discard it because:
1) I thought it was too complex
2) the need to allocate relatively expensive data dma coherent
memory for something that is never DMAed to.
> This is something I hacked up over the weekend. It's only lightly
> tested, and I know there's a bug somewhere here with the chainging, but
> it's a start.
This looks a lot less complex than I feared. I still don't think having
to allocate DMA memory for storing the ranges is all that great, mostly
because this is exactly the path we're going to hit for non-coherent
attachment where the DMA coherent memory will have a performance impact
because it is marked uncachable.
next prev parent reply other threads:[~2025-07-07 15:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 12:52 [PATCH] nvme-pci: fix dma unmapping when using PRPs and not using the IOVA mapping Christoph Hellwig
2025-07-07 14:29 ` Keith Busch
2025-07-07 15:01 ` Christoph Hellwig [this message]
2025-07-07 15:13 ` Keith Busch
2025-07-07 15:13 ` Keith Busch
2025-07-08 12:55 ` Jens Axboe
2025-07-11 0:25 ` Klara Modin
2025-07-11 0:37 ` Keith Busch
2025-07-11 8:32 ` Christoph Hellwig
2025-07-11 9:07 ` Klara Modin
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=20250707150116.GA1939@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=ben.copeland@linaro.org \
--cc=kbusch@kernel.org \
--cc=leon@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox