selftests: ublk: kublk: decouple ublk_queues from ublk server threads
authorUday Shankar <ushankar@purestorage.com>
Thu, 29 May 2025 23:47:15 +0000 (17:47 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 30 May 2025 13:06:52 +0000 (07:06 -0600)
commit5163fa0f106d7a31c185559f95c7afd3672e69e6
treef3ce0caf53e30b60b5845e1b402bc49637fe7f4a
parentf21561bc01bf887c2f620d2e4a9a52b999f776cd
selftests: ublk: kublk: decouple ublk_queues from ublk server threads

Add support in kublk for decoupled ublk_queues and ublk server threads.
kublk now has two modes of operation:

- (preexisting mode) threads and queues are paired 1:1, and each thread
  services all the I/Os of one queue
- (new mode) thread and queue counts are independently configurable.
  threads service I/Os in a way that balances load across threads even
  if load is not balanced over queues.

The default is the preexisting mode. The new mode is activated by
passing the --per_io_tasks flag.

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-6-e9d3b119336a@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
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