From 877573897ad52be4fa8989f7617bd655b87e05c4 Mon Sep 17 00:00:00 2001 From: "Simon A. F. Lund" Date: Sat, 24 Sep 2022 15:35:48 +0200 Subject: [PATCH] xnvme: update submodule to v0.5.0 This updates the xNVMe submodule to v0.5.0 and adjusts the Makefile, disabling a backend (libvfn) introduced in v0.5.0 which is not of interest. With xNVMe v0.5.0 two things important for the bdev_xnvme has changed: * The 'libaio' backend implementation responds to 'opts.poll_io'. It does so by 'xnvme_queue_poke()' returning immediatly instead of waiting for at least one outstanding IO to complete or for a timeout to occur. This dramatically improves the IO-rate and reduces latency. * Prior to xNVMe v0.5.0, the liburing library was vendored and "bundled" into the xNVMe library. This library-bundling can cause linker issue and is thus replaced by linking "properly" with liburing on the system via pkg-config discovery. To make sure linker can properly link libxnvme.a's content we need to make sure we point at system's -luring during the build. Effectively, this can now work together with --with-uring[=/uring]. This change is made in preparation to adding the 'conserve_cpu' option which makes use of 'opts.poll_io' for 'io_mechanism=libaio'. Signed-off-by: Simon A. F. Lund Signed-off-by: Michal Berger Change-Id: Ibd6e620679a3991a4a8642bb39390a61284aac74 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14677 Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot --- configure | 2 +- mk/spdk.common.mk | 3 +++ xnvme | 2 +- xnvmebuild/Makefile | 6 +++++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 3aded8b48..19a538e7d 100755 --- a/configure +++ b/configure @@ -1077,7 +1077,7 @@ elif [[ "${CONFIG[PGO_USE]}" = "y" ]]; then fi fi -if [[ "${CONFIG[URING]}" = "y" ]]; then +if [[ "${CONFIG[URING]}" = "y" || "${CONFIG[XNVME]}" = "y" ]]; then if [[ -n "${CONFIG[URING_PATH]}" ]]; then check_dir "${CONFIG[URING_PATH]}" elif ! echo -e '#include \nint main(void) { return 0; }\n' \ diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk index dc157ca6c..0d8ecd0c5 100644 --- a/mk/spdk.common.mk +++ b/mk/spdk.common.mk @@ -220,6 +220,9 @@ XNVME_INCLUDE_DIR=$(XNVME_DIR)/include CFLAGS += -I$(XNVME_INCLUDE_DIR) LDFLAGS += -L$(XNVME_INSTALL_DIR) SYS_LIBS += -lxnvme +ifneq ($(CONFIG_URING), y) +SYS_LIBS += -luring +endif endif ifeq ($(CONFIG_DAOS),y) diff --git a/xnvme b/xnvme index e507f2d17..59cca28a6 160000 --- a/xnvme +++ b/xnvme @@ -1 +1 @@ -Subproject commit e507f2d1791163d0c2757f1b973cd2cf6dfcb573 +Subproject commit 59cca28a61ae3154ba1731ca2ee7daa402ec5e2e diff --git a/xnvmebuild/Makefile b/xnvmebuild/Makefile index 60b8279ff..30dec5aeb 100644 --- a/xnvmebuild/Makefile +++ b/xnvmebuild/Makefile @@ -11,7 +11,11 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk all: (cd $(SPDK_ROOT_DIR)/xnvme && \ export PKG_CONFIG_PATH=$$PKG_CONFIG_PATH:/usr/lib/pkgconfig:/usr/lib64/pkgconfig && \ - meson setup builddir -Dwith-spdk=false -Dwith-fio=false -Dshared_library=false && \ + meson setup builddir \ + -Dwith-spdk=false \ + -Dwith-fio=false \ + -Dwith-libvfn=false \ + -Dshared_library=false && \ meson compile -C builddir && \ cd -)