Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] Add an option for devices to skip SWIOTLB pre-copy on read.
@ 2025-02-04 23:36 Jianxiong Gao
  2025-02-04 23:36 ` [RFC PATCH 1/3] add full_buffer_write flag to struct device_dma_parameters Jianxiong Gao
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Jianxiong Gao @ 2025-02-04 23:36 UTC (permalink / raw)
  To: Keith Busch, Marek Szyprowski
  Cc: Jens Axboe, Christoph Hellwig, Sagi Grimberg, Robin Murphy,
	Andy Shevchenko, Dan Williams, Erdem Aktas, Vishal Annapurve,
	Ryan Afranji, linux-nvme, iommu, Jianxiong Gao

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. In such
cases the entire pre-copy is redundent, only to slow down
the overall bounce buffering.

We propose to add a full_buffer_write flag to the
device_dma_parameters flag. When the flag is set the pre-copy
can be omitted to boost performance.

Jianxiong Gao (3):
  add full_buffer_write flag to struct device_dma_parameters
  skip swiotlb pre copy if the device does full buffer write.
  set full_buffer_write for nvme devices.

 drivers/nvme/host/pci.c     |  1 +
 include/linux/device.h      |  1 +
 include/linux/dma-mapping.h | 15 +++++++++++++++
 kernel/dma/swiotlb.c        |  3 ++-
 4 files changed, 19 insertions(+), 1 deletion(-)

-- 
2.48.1.362.g079036d154-goog



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-02-05 16:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-02-05 11:46 ` Robin Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox