Skip to content

Commit 289653b

Browse files
ming1axboe
authored andcommitted
Documentation: ublk: address review comments for SHMEM_ZC docs
- Use "physical pages" instead of "page frame numbers (PFNs)" for clarity - Remove "without any per-I/O overhead" claim from zero-copy description - Add scatter/gather limitation: each I/O's data must be contiguous within a single registered buffer Suggested-by: Caleb Sander Mateos <csander@purestorage.com> Signed-off-by: Ming Lei <tom.leiming@gmail.com> Link: https://patch.msgid.link/20260409133020.3780098-7-tom.leiming@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 365ea7c commit 289653b

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

Documentation/block/ublk.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,8 @@ The ``UBLK_F_SHMEM_ZC`` feature provides an alternative zero-copy path
492492
that works by sharing physical memory pages between the client application
493493
and the ublk server. Unlike the io_uring fixed buffer approach above,
494494
shared memory zero copy does not require io_uring buffer registration
495-
per I/O — instead, it relies on the kernel matching page frame numbers
496-
(PFNs) at I/O time. This allows the ublk server to access the shared
495+
per I/O — instead, it relies on the kernel matching physical pages
496+
at I/O time. This allows the ublk server to access the shared
497497
buffer directly, which is unlikely for the io_uring fixed buffer
498498
approach.
499499

@@ -507,8 +507,7 @@ tells the server where the data already lives.
507507

508508
``UBLK_F_SHMEM_ZC`` can be thought of as a supplement for optimized client
509509
applications — when the client is willing to allocate I/O buffers from
510-
shared memory, the entire data path becomes zero-copy without any per-I/O
511-
overhead.
510+
shared memory, the entire data path becomes zero-copy.
512511

513512
Use Cases
514513
~~~~~~~~~
@@ -584,6 +583,9 @@ Limitations
584583
the page cache, which allocates its own pages. These kernel-allocated
585584
pages will never match the registered shared buffer. Only ``O_DIRECT``
586585
puts the client's buffer pages directly into the block I/O.
586+
- **Contiguous data only**: each I/O request's data must be contiguous
587+
within a single registered buffer. Scatter/gather I/O that spans
588+
multiple non-adjacent registered buffers cannot use the zero-copy path.
587589

588590
Control Commands
589591
~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)