[RFC 0/4] partial sector read support

Keith Busch kbusch at fb.com
Wed May 4 09:32:03 PDT 2022


From: Keith Busch <kbusch at kernel.org>

Don't you just hate that you must read a full sector when you only cared
about a few bytes? Well, good news! Standardized protocols provide a way
for the host to describe unwanted read data, allowing partial sector
access. This lets applications reduce allocated memory that was used to
hold the unwanted data, while also reducing link traffic.

This series enables this for the NVMe protocol through direct io. With
this, a userspace app can read a single contiguous byte range, subject
to hardware DMA constraints. An in-kernel user could theorectically
construct a bio to read multiple discontiguous ranges if desired.

Keith Busch (4):
  block: export dma_alignment attribute
  block: relax direct io memory alignment
  block: add bit bucket support
  nvme: add bit bucket support

 block/blk-core.c          |  5 ++++
 block/blk-merge.c         |  3 +-
 block/blk-mq.c            |  2 ++
 block/blk-sysfs.c         | 10 +++++++
 block/fops.c              | 61 +++++++++++++++++++++++++++++++++------
 drivers/nvme/host/core.c  |  3 ++
 drivers/nvme/host/nvme.h  |  6 ++++
 drivers/nvme/host/pci.c   | 17 +++++++++--
 fs/direct-io.c            | 11 ++++---
 fs/iomap/direct-io.c      |  3 +-
 include/linux/blk-mq.h    |  2 ++
 include/linux/blk_types.h |  1 +
 include/linux/blkdev.h    | 18 ++++++++++++
 include/linux/nvme.h      |  2 ++
 14 files changed, 127 insertions(+), 17 deletions(-)

-- 
2.30.2




More information about the Linux-nvme mailing list