From cfe5d18823aaadedf999c4ce2f05335a1d4abefd Mon Sep 17 00:00:00 2001 From: "Simon A. F. Lund" Date: Mon, 26 Sep 2022 17:26:45 +0200 Subject: [PATCH] bdev/xnvme: enable polling on io_uring_cmd Fixes #2708 for io_uring_cmd. This is a minimal approach to enabling polling for bdev_xnvme. Ideally, more would be done, however, there are several blockers to remove when doing so. Thus, this commit only enables polling on io_mechanism=io_uring_cmd. Signed-off-by: Simon A. F. Lund Change-Id: Ifa604b52bb2b924fab4b559fae06f26a3574db42 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14679 Reviewed-by: Ben Walker Reviewed-by: Jim Harris Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins --- module/bdev/xnvme/bdev_xnvme.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/module/bdev/xnvme/bdev_xnvme.c b/module/bdev/xnvme/bdev_xnvme.c index f71df0ede..645ff0779 100644 --- a/module/bdev/xnvme/bdev_xnvme.c +++ b/module/bdev/xnvme/bdev_xnvme.c @@ -320,6 +320,10 @@ create_xnvme_bdev(const char *name, const char *filename, const char *io_mechani goto error_return; } + if (!strcmp(xnvme->io_mechanism, "io_uring_cmd")) { + opts.poll_sq = 1; + } + xnvme->filename = strdup(filename); if (!xnvme->filename) { goto error_return;