[RFC PATCH 0/3] Add an option for devices to skip SWIOTLB pre-copy on read.

Jianxiong Gao jxgao at google.com
Tue Feb 4 15:36:27 PST 2025


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




More information about the Linux-nvme mailing list