linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ublk: simplify user copy
@ 2025-11-05 20:28 Caleb Sander Mateos
  2025-11-05 20:28 ` [PATCH v2 1/2] ublk: use copy_{to,from}_iter() for " Caleb Sander Mateos
  2025-11-05 20:28 ` [PATCH v2 2/2] ublk: use rq_for_each_bvec() " Caleb Sander Mateos
  0 siblings, 2 replies; 6+ messages in thread
From: Caleb Sander Mateos @ 2025-11-05 20:28 UTC (permalink / raw)
  To: Ming Lei, Jens Axboe; +Cc: linux-block, linux-kernel, Caleb Sander Mateos

Use copy_page_{to,from}_user() and rq_for_each_bvec() 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.

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_bvec() for user copy

 drivers/block/ublk_drv.c | 113 ++++++++-------------------------------
 1 file changed, 23 insertions(+), 90 deletions(-)

-- 
2.45.2


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

end of thread, other threads:[~2025-11-06 16:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 20:28 [PATCH v2 0/2] ublk: simplify user copy Caleb Sander Mateos
2025-11-05 20:28 ` [PATCH v2 1/2] ublk: use copy_{to,from}_iter() for " Caleb Sander Mateos
2025-11-06  4:22   ` Ming Lei
2025-11-05 20:28 ` [PATCH v2 2/2] ublk: use rq_for_each_bvec() " Caleb Sander Mateos
2025-11-06  4:27   ` Ming Lei
2025-11-06 16:49     ` Caleb Sander Mateos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).