]> www.infradead.org Git - nvme.git/commitdiff
selftests: ublk: setup ring with IORING_SETUP_SINGLE_ISSUER/IORING_SETUP_DEFER_TASKRUN
authorMing Lei <ming.lei@redhat.com>
Sat, 12 Apr 2025 02:30:23 +0000 (10:30 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 17 Apr 2025 01:32:18 +0000 (19:32 -0600)
It is observed that this way is more efficient for fast nvme backing
file.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250412023035.2649275-8-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/kublk.c

index 381e31acaad94f852649d3179a263ee03b6908cb..c2acd874f9af2e4d413d10a9c3907984d2f3258b 100644 (file)
@@ -346,7 +346,9 @@ static int ublk_queue_init(struct ublk_queue *q)
        }
 
        ret = ublk_setup_ring(&q->ring, ring_depth, cq_depth,
-                       IORING_SETUP_COOP_TASKRUN);
+                       IORING_SETUP_COOP_TASKRUN |
+                       IORING_SETUP_SINGLE_ISSUER |
+                       IORING_SETUP_DEFER_TASKRUN);
        if (ret < 0) {
                ublk_err("ublk dev %d queue %d setup io_uring failed %d\n",
                                q->dev->dev_info.dev_id, q->q_id, ret);