Skip to content

ublk: two fixes and support UBLK_F_AUTO_ZERO_COPY

Ming Lei linux-block 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4selftests: ublk: fix UBLK_F_NEED_GET_DATAtools/testing/selftests/ublk/Makefile tools/testing/selftests/ublk/kublk.c tools/testing/selftests/ublk/kublk.h +1 more+35 -32 replies
2/4ublk: enhance check for register/unregister io buffer commanddrivers/block/ublk_drv.c+22 -14 replies
3/4ublk: add feature UBLK_F_AUTO_ZERO_COPYdrivers/block/ublk_drv.c include/uapi/linux/ublk_cmd.h+89 -188 replies
4/4selftests: ublk: support UBLK_F_AUTO_ZERO_COPYtools/testing/selftests/ublk/Makefile tools/testing/selftests/ublk/file_backed.c tools/testing/selftests/ublk/kublk.c +7 more+111 -240 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchCaleb Sander Mateos
1/4R-b
2/4
3/4
4/4

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

Read the v1 thread

Cover letter [PATCH 0/4] ublk: two fixes and support UBLK_F_AUTO_ZERO_COPY

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
Signature · 1 line
2.47.0