linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] ublk: two fixes and support UBLK_F_AUTO_ZERO_COPY
@ 2025-04-26  9:41 Ming Lei
  2025-04-26  9:41 ` [PATCH 1/4] selftests: ublk: fix UBLK_F_NEED_GET_DATA Ming Lei
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Ming Lei @ 2025-04-26  9:41 UTC (permalink / raw)
  To: Jens Axboe, linux-block; +Cc: Uday Shankar, Caleb Sander Mateos, Ming Lei

Hi Jens,

The 1st patch fixes UBLK_F_NEED_GET_DATA implementation in selftest ublk utility,
meantime add test to cover this feature.

The 2nd patch enhances check for register/unregister IO buffer uring command.

The 3rd patch adds UBLK_F_AUTO_ZERO_COPY by registering zc buffer before delivering
io command to ublk server and un-registering zc buffer when completing io command.
This way not only improves zero copy perf, but also makes it much easier to use:

- ublk/null: iops is improved by 50%(--auto_zc vs. -z, -q 2)

- ublk server needn't to register/unregister io buffer uring_cmd any more,
  which is done automatically by ublk driver

- ublk server zc buffer consumer OPs need to depend on register/unregister
  io buffer uring_cmd any more. Without this feature, buffer consumer OP
  has to respect the dependency by IOSQE_IO_LINK.

The last patch adds function & stress tests for UBLK_F_AUTO_ZERO_COPY.

Thanks,
Ming

Ming Lei (4):
  selftests: ublk: fix UBLK_F_NEED_GET_DATA
  ublk: enhance check for register/unregister io buffer command
  ublk: add feature UBLK_F_AUTO_ZERO_COPY
  selftests: ublk: support UBLK_F_AUTO_ZERO_COPY

 drivers/block/ublk_drv.c                      | 110 +++++++++++++++---
 include/uapi/linux/ublk_cmd.h                 |  20 ++++
 tools/testing/selftests/ublk/Makefile         |   3 +
 tools/testing/selftests/ublk/file_backed.c    |   9 +-
 tools/testing/selftests/ublk/kublk.c          |  24 +++-
 tools/testing/selftests/ublk/kublk.h          |   7 ++
 tools/testing/selftests/ublk/null.c           |  43 +++++--
 tools/testing/selftests/ublk/stripe.c         |  14 +--
 .../testing/selftests/ublk/test_generic_07.sh |  25 ++++
 .../testing/selftests/ublk/test_generic_08.sh |  28 +++++
 .../testing/selftests/ublk/test_stress_03.sh  |   6 +
 .../testing/selftests/ublk/test_stress_04.sh  |   6 +
 .../testing/selftests/ublk/test_stress_05.sh  |   8 ++
 13 files changed, 257 insertions(+), 46 deletions(-)
 create mode 100755 tools/testing/selftests/ublk/test_generic_07.sh
 create mode 100755 tools/testing/selftests/ublk/test_generic_08.sh

-- 
2.47.0


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

end of thread, other threads:[~2025-04-27  7:32 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-26  9:41 [PATCH 0/4] ublk: two fixes and support UBLK_F_AUTO_ZERO_COPY Ming Lei
2025-04-26  9:41 ` [PATCH 1/4] selftests: ublk: fix UBLK_F_NEED_GET_DATA Ming Lei
2025-04-26 20:15   ` Caleb Sander Mateos
2025-04-27  1:26     ` Ming Lei
2025-04-26  9:41 ` [PATCH 2/4] ublk: enhance check for register/unregister io buffer command Ming Lei
2025-04-26 20:38   ` Caleb Sander Mateos
2025-04-27  1:37     ` Ming Lei
2025-04-27  3:14       ` Caleb Sander Mateos
2025-04-27  3:49         ` Ming Lei
2025-04-26  9:41 ` [PATCH 3/4] ublk: add feature UBLK_F_AUTO_ZERO_COPY Ming Lei
2025-04-26 22:42   ` Caleb Sander Mateos
2025-04-27  2:06     ` Ming Lei
2025-04-27  3:09       ` Caleb Sander Mateos
2025-04-27  3:15         ` Ming Lei
2025-04-27  2:34     ` Keith Busch
2025-04-27  3:10       ` Ming Lei
2025-04-27  4:04         ` Keith Busch
2025-04-27  7:32           ` Ming Lei
2025-04-26  9:41 ` [PATCH 4/4] selftests: ublk: support UBLK_F_AUTO_ZERO_COPY Ming Lei

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).