Skip to content

ublk: simplify user copy

Caleb Sander Mateos linux-block lkml 3 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 2 repliesApplied
  2. v22 patches 3 repliesSuperseded
  3. v11 patch 11 repliesSuperseded

Changes in v3 from the cover letter

- Use rq_for_each_segment() to avoid copying multi-page bvecs (Ming)
- Add Reviewed-by from Ming

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/2ublk: use copy_{to,from}_iter() for user copydrivers/block/ublk_drv.c+14 -480 replies
2/2ublk: use rq_for_each_segment() for user copydrivers/block/ublk_drv.c+19 -511 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchMing Lei
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 0/2] ublk: simplify user copy

Use copy_page_{to,from}_user() and rq_for_each_segment() to simplify the implementation of ublk_copy_user_pages(). Avoiding the page pinning and unpinning saves expensive atomic increments and decrements of the page reference counts. And copying via user virtual addresses avoids needing to split the copy at user page boundaries. Ming reports a 40% throughput improvement when issuing I/O to the selftests null ublk server with zero-copy disabled.

v3:
- Use rq_for_each_segment() to avoid copying multi-page bvecs (Ming)
- Add Reviewed-by from Ming

v2:
- Use rq_for_each_bvec() to further simplify the code (Ming)
- Add performance measurements from Ming

Caleb Sander Mateos (2):
ublk: use copy_{to,from}_iter() for user copy
ublk: use rq_for_each_segment() for user copy

 drivers/block/ublk_drv.c | 114 +++++++++------------------------------
 1 file changed, 24 insertions(+), 90 deletions(-)
Signature · 1 line
2.45.2