selftests: ublk: support UBLK_F_AUTO_BUF_REG
authorMing Lei <ming.lei@redhat.com>
Tue, 20 May 2025 04:54:35 +0000 (12:54 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 20 May 2025 16:24:45 +0000 (10:24 -0600)
commit8ccebc19ee3db03284504d340e5cd2de4141350b
tree38ccdbaf1f20b30b6f7a1aa679e81fa442b4eb7f
parent53f427e7944b4f288866cc4a69835086e0958c6a
selftests: ublk: support UBLK_F_AUTO_BUF_REG

Enable UBLK_F_AUTO_BUF_REG support for ublk utility by argument `--auto_zc`,
meantime support this feature in null, loop and stripe target code.

Add function test generic_08 for covering basic UBLK_F_AUTO_BUF_REG feature.

Also cover UBLK_F_AUTO_BUF_REG in stress_03, stress_04 and stress_05 test too.

'fio/t/io_uring -p0 /dev/ublkb0' shows that F_AUTO_BUF_REG can improve
IOPS by 50% compared with F_SUPPORT_ZERO_COPY in my test VM.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250520045455.515691-6-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/Makefile
tools/testing/selftests/ublk/file_backed.c
tools/testing/selftests/ublk/kublk.c
tools/testing/selftests/ublk/kublk.h
tools/testing/selftests/ublk/null.c
tools/testing/selftests/ublk/stripe.c
tools/testing/selftests/ublk/test_generic_08.sh [new file with mode: 0755]
tools/testing/selftests/ublk/test_stress_03.sh
tools/testing/selftests/ublk/test_stress_04.sh
tools/testing/selftests/ublk/test_stress_05.sh