]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests: ublk: add functional test for per io daemons
authorUday Shankar <ushankar@purestorage.com>
Thu, 29 May 2025 23:47:16 +0000 (17:47 -0600)
committerJens Axboe <axboe@kernel.dk>
Sat, 31 May 2025 20:38:48 +0000 (14:38 -0600)
commit236918d3e9ac45d593c2f74e1df598483a508d2f
tree7c680fe686e681ee7bc4e37a650e290f8940cd22
parentabe54c16034631db01aba02e06da569b33002ab1
selftests: ublk: add functional test for per io daemons

Add a new test test_generic_12 which:

- sets up a ublk server with per_io_tasks and a different number of ublk
  server threads and ublk_queues. This is possible now that these
  objects are decoupled
- runs some I/O load from a single CPU
- verifies that all the ublk server threads handle some I/O

Before this changeset, this test fails, since I/O issued from one CPU is
always handled by the one ublk server thread. After this changeset, the
test passes.

In the future, the last check above may be strengthened to "verify that
all ublk server threads handle the same amount of I/O." However, this
requires some adjustments/bugfixes to tag allocation, so this work is
postponed to a followup.

Signed-off-by: Uday Shankar <ushankar@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250529-ublk_task_per_io-v8-7-e9d3b119336a@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/Makefile
tools/testing/selftests/ublk/test_generic_12.sh [new file with mode: 0755]
tools/testing/selftests/ublk/trace/count_ios_per_tid.bt [new file with mode: 0644]