From: Christoph Hellwig <hch@lst.de>
To: Robin Murphy <robin.murphy@arm.com>
Cc: axboe@fb.com, heikki.krogerus@linux.intel.com, sagi@grimberg.me,
saravanak@google.com, konrad.wilk@oracle.com, marcorr@google.com,
gregkh@linuxfoundation.org, rafael.j.wysocki@intel.com,
linux-kernel@vger.kernel.org, andriy.shevchenko@linux.intel.com,
kbusch@kernel.org, bgolaszewski@baylibre.com,
iommu@lists.linux-foundation.org, jroedel@suse.de,
linux-nvme@lists.infradead.org, erdemaktas@google.com,
dan.j.williams@intel.com, Jianxiong Gao <jxgao@google.com>,
hch@lst.de, m.szyprowski@samsung.com
Subject: Re: [PATCH 3/3] Adding device_dma_parameters->offset_preserve_mask to NVMe driver.
Date: Thu, 28 Jan 2021 19:18:04 +0100 [thread overview]
Message-ID: <20210128181804.GC11790@lst.de> (raw)
In-Reply-To: <0550ca25-1389-ffc2-e738-8127ceb1712f@arm.com>
On Thu, Jan 28, 2021 at 06:00:58PM +0000, Robin Murphy wrote:
> If it were possible for this to fail, you might leak the DMA mapping here.
> However if dev->dma_parms somehow disappeared since a dozen lines above
> then I think you've got far bigger problems anyway.
>
> That said, do you really need to keep toggling this back and forth all the
> time? Even if the device does make other mappings elsewhere that don't
> necessarily need the same strict alignment, would it be significantly
> harmful just to set it once at probe and leave it in place anyway?
Yes, we should kept it set all the time. While some NVMe devices have
the optional to use SGLs that do not have this limitation, I have
absolutely no sympathy for anyone running NVMe with swiotlb as that
means their system imposes an addressing limitation. We need to make
sure it does not corrupt data, but we're not going to make any effort
to optimize for such a degenerated setup.
_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
next prev parent reply other threads:[~2021-01-28 18:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-28 0:38 [PATCH 0/3] Adding offset keeping option when mapping data via SWIOTLB.* Jianxiong Gao
2021-01-28 0:38 ` [PATCH 1/3] Adding page_offset_mask to device_dma_parameters Jianxiong Gao
2021-01-28 17:27 ` Robin Murphy
2021-01-28 18:15 ` Christoph Hellwig
2021-01-28 0:38 ` [PATCH 2/3] Add swiotlb offset preserving mapping when dma_dma_parameters->page_offset_mask is non zero Jianxiong Gao
2021-01-28 17:15 ` Konrad Rzeszutek Wilk
2021-01-28 17:34 ` Keith Busch
2021-01-28 18:16 ` Christoph Hellwig
2021-01-28 0:38 ` [PATCH 3/3] Adding device_dma_parameters->offset_preserve_mask to NVMe driver Jianxiong Gao
2021-01-28 18:00 ` Robin Murphy
2021-01-28 18:18 ` Christoph Hellwig [this message]
2021-01-28 8:04 ` [PATCH 0/3] Adding offset keeping option when mapping data via SWIOTLB.* Greg KH
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=20210128181804.GC11790@lst.de \
--to=hch@lst.de \
--cc=andriy.shevchenko@linux.intel.com \
--cc=axboe@fb.com \
--cc=bgolaszewski@baylibre.com \
--cc=dan.j.williams@intel.com \
--cc=erdemaktas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jroedel@suse.de \
--cc=jxgao@google.com \
--cc=kbusch@kernel.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=m.szyprowski@samsung.com \
--cc=marcorr@google.com \
--cc=rafael.j.wysocki@intel.com \
--cc=robin.murphy@arm.com \
--cc=sagi@grimberg.me \
--cc=saravanak@google.com \
/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