Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Jianxiong Gao <jxgao@google.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Jens Axboe <axboe@kernel.dk>, Sagi Grimberg <sagi@grimberg.me>,
	Robin Murphy <robin.murphy@arm.com>,
	Dan Williams <dan.j.williams@intel.com>,
	Erdem Aktas <erdemaktas@google.com>,
	Vishal Annapurve <vannapurve@google.com>,
	Ryan Afranji <afranji@google.com>,
	linux-nvme@lists.infradead.org, iommu@lists.linux.dev
Subject: Re: [RFC PATCH 0/3] Add an option for devices to skip SWIOTLB pre-copy on read.
Date: Wed, 5 Feb 2025 09:18:16 -0700	[thread overview]
Message-ID: <Z6OPSFuxtEluOb8o@kbusch-mbp> (raw)
In-Reply-To: <20250205154321.GB13814@lst.de>

On Wed, Feb 05, 2025 at 04:43:21PM +0100, Christoph Hellwig wrote:
> On Wed, Feb 05, 2025 at 09:54:21AM +0200, Andy Shevchenko wrote:
> > On Tue, Feb 04, 2025 at 11:36:27PM +0000, Jianxiong Gao wrote:
> > > Removes an extra memory copy that occurs during IO read
> > > operations through the SWIOTLB. During high throughput
> > > read workloads, this extra copy is causing a lot of stress
> > > on the SWIOTLB.
> > > 
> > > With high performance devices, for example NVMe devices,
> > > the device will be overwriting the entire buffer.
> > 
> > Is this really guaranteed? I can imagine surprise power cut or
> > hotplug event, for example, just in the middle of the transfer.
> 
> Many command can return less data than originally mapped.  Get Log Page
> is an example that comes to mind that is heavily used that way.

It's also easy enough for a user to "mistakenly" request more memory
than the device will transfer. The safest thing is to clear any contents
that may get copied back to the user.


  reply	other threads:[~2025-02-05 16:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-04 23:36 [RFC PATCH 0/3] Add an option for devices to skip SWIOTLB pre-copy on read Jianxiong Gao
2025-02-04 23:36 ` [RFC PATCH 1/3] add full_buffer_write flag to struct device_dma_parameters Jianxiong Gao
2025-02-05  8:01   ` Andy Shevchenko
2025-02-04 23:36 ` [RFC PATCH 2/3] skip swiotlb pre copy if the device does full buffer write Jianxiong Gao
2025-02-04 23:36 ` [RFC PATCH 3/3] set full_buffer_write for nvme devices Jianxiong Gao
2025-02-05  7:54 ` [RFC PATCH 0/3] Add an option for devices to skip SWIOTLB pre-copy on read Andy Shevchenko
2025-02-05 15:43   ` Christoph Hellwig
2025-02-05 16:18     ` Keith Busch [this message]
2025-02-05 11:46 ` Robin Murphy

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=Z6OPSFuxtEluOb8o@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=afranji@google.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=axboe@kernel.dk \
    --cc=dan.j.williams@intel.com \
    --cc=erdemaktas@google.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux.dev \
    --cc=jxgao@google.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=m.szyprowski@samsung.com \
    --cc=robin.murphy@arm.com \
    --cc=sagi@grimberg.me \
    --cc=vannapurve@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