Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Sep 7, 2022 Kbuild

lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 021ce718f5ae4bfd5f4e42290993578adb7c7bd5:

t/io_uring: enable support for registered buffers for passthrough (2022-09-03 11:04:06 -0600)

are available in the Git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to 10fc06dc4166ef7c69a6c06cb3a318878048f6be:

Merge branch 'rpma-add-support-for-libpmem2-to-the-librpma-engine' of https://github.com/ldorau/fio (2022-09-06 06:58:48 -0600)

----------------------------------------------------------------
Jens Axboe (2):
Merge branch 'ci-build-the-librpma-fio-engine' of https://github.com/ldorau/fio
Merge branch 'rpma-add-support-for-libpmem2-to-the-librpma-engine' of https://github.com/ldorau/fio

Kacper Stefanski (2):
rpma: add support for libpmem2 to librpma engine in APM mode
rpma: add support for libpmem2 to librpma engine in GPSPM mode

Lukasz Dorau (3):
rpma: simplify server_cmpl_process()
ci: build the librpma fio engine
ci: remove the unused travis-install-pmdk.sh file

 Makefile                                           | 12 ++-
 ...stall-librpma.sh => actions-install-librpma.sh} |  3 +-
 ci/actions-install.sh                              |  6 ++
 ci/travis-install-pmdk.sh                          | 29 -------
 configure                                          | 29 ++++++-
 engines/librpma_fio.c                              | 52 ++++---------
 engines/librpma_fio.h                              |  7 +-
 engines/librpma_fio_pmem.h                         | 67 ++++++++++++++++
 engines/librpma_fio_pmem2.h                        | 91 ++++++++++++++++++++++
 engines/librpma_gpspm.c                            | 59 ++++++++------
 10 files changed, 257 insertions(+), 98 deletions(-)
 rename ci/{travis-install-librpma.sh => actions-install-librpma.sh} (74%)
 delete mode 100755 ci/travis-install-pmdk.sh
 create mode 100644 engines/librpma_fio_pmem.h
 create mode 100644 engines/librpma_fio_pmem2.h

---

Diff of recent changes:

Makefile +10 -2
index 634d2c93..f947f11c 100644
@@ -111,13 +111,21 @@ endif
 ifdef CONFIG_LIBRPMA_APM
   librpma_apm_SRCS = engines/librpma_apm.c
   librpma_fio_SRCS = engines/librpma_fio.c
-  librpma_apm_LIBS = -lrpma -lpmem
+  ifdef CONFIG_LIBPMEM2_INSTALLED
+    librpma_apm_LIBS = -lrpma -lpmem2
+  else
+    librpma_apm_LIBS = -lrpma -lpmem
+  endif
   ENGINES += librpma_apm
 endif
 ifdef CONFIG_LIBRPMA_GPSPM
   librpma_gpspm_SRCS = engines/librpma_gpspm.c engines/librpma_gpspm_flush.pb-c.c
   librpma_fio_SRCS = engines/librpma_fio.c
-  librpma_gpspm_LIBS = -lrpma -lpmem -lprotobuf-c
+  ifdef CONFIG_LIBPMEM2_INSTALLED
+    librpma_gpspm_LIBS = -lrpma -lpmem2 -lprotobuf-c
+  else
+    librpma_gpspm_LIBS = -lrpma -lpmem -lprotobuf-c
+  endif
   ENGINES += librpma_gpspm
 endif
 ifdef librpma_fio_SRCS
ci/actions-install-librpma.sh renamed from ci/travis-install-librpma.sh +1 -2
similarity index 74%
rename from ci/travis-install-librpma.sh
rename to ci/actions-install-librpma.sh
index 4e5ed21d..31f9f712 100755
@@ -1,7 +1,6 @@
 #!/bin/bash -e
 
-# 11.02.2021 Merge pull request #866 from ldorau/rpma-mmap-memory-for-rpma_mr_reg-in-rpma_flush_apm_new
-LIBRPMA_VERSION=fbac593917e98f3f26abf14f4fad5a832b330f5c
+LIBRPMA_VERSION="1.0.0"
 ZIP_FILE=rpma.zip
 
 WORKDIR=$(pwd)
ci/actions-install.sh +6 -0
index c209a089..82e14d2a 100755
@@ -44,7 +44,9 @@ DPKGCFG
                 libiscsi-dev
                 libnbd-dev
                 libpmem-dev
+                libpmem2-dev
                 libpmemblk-dev
+                libprotobuf-c-dev
                 librbd-dev
                 libtcmalloc-minimal4
                 nvidia-cuda-dev
@@ -67,6 +69,10 @@ DPKGCFG
     sudo apt-get -qq update
     echo "Installing packages... ${pkgs[@]}"
     sudo apt-get install -o APT::Immediate-Configure=false --no-install-recommends -qq -y "${pkgs[@]}"
+    if [ "${CI_TARGET_ARCH}" == "x86_64" ]; then
+        # install librpma from sources
+        ci/actions-install-librpma.sh
+    fi
 }
 
 install_linux() {
ci/travis-install-pmdk.sh deleted +0 -29
deleted file mode 100755
index 7bde9fd0..00000000
@@ -1,29 +0,0 @@
-#!/bin/bash -e
-
-# pmdk v1.9.1 release
-PMDK_VERSION=1.9.1
-
-WORKDIR=$(pwd)
-
-#
-# The '/bin/sh' shell used by PMDK's 'make install'
-# does not know the exact localization of clang
-# and fails with:
-#    /bin/sh: 1: clang: not found
-# if CC is not set to the full path of clang.
-#
-CC=$(type -P "$CC")
-export CC
-
-# Install PMDK libraries, because PMDK's libpmem
-# is a dependency of the librpma fio engine.
-# Install it from a release package
-# with already generated documentation,
-# in order to not install 'pandoc'.
-wget https://github.com/pmem/pmdk/releases/download/${PMDK_VERSION}/pmdk-${PMDK_VERSION}.tar.gz
-tar -xzf pmdk-${PMDK_VERSION}.tar.gz
-cd pmdk-${PMDK_VERSION}
-make -j"$(nproc)" NDCTL_ENABLE=n
-sudo make -j"$(nproc)" install prefix=/usr NDCTL_ENABLE=n
-cd "$WORKDIR"
-rm -rf pmdk-${PMDK_VERSION}
configure +27 -2
index a2b9bd4c..7741ef4f 100755
@@ -2201,6 +2201,26 @@ EOF
 fi
 print_config "libpmem1_5" "$libpmem1_5"
 
+##########################################
+# Check whether we have libpmem2
+if test "$libpmem2" != "yes" ; then
+  libpmem2="no"
+fi
+cat > $TMPC << EOF
+#include <libpmem2.h>
+int main(int argc, char **argv)
+{
+  struct pmem2_config *cfg;
+  pmem2_config_new(&cfg);
+  pmem2_config_delete(&cfg);
+  return 0;
+}
+EOF
+if compile_prog "" "-lpmem2" "libpmem2"; then
+  libpmem2="yes"
+fi
+print_config "libpmem2" "$libpmem2"
+
 ##########################################
 # Check whether we have libpmemblk
 # libpmem is a prerequisite
@@ -2990,11 +3010,13 @@ if test "$libverbs" = "yes" -a "$rdmacm" = "yes" ; then
 fi
 # librpma is supported on the 'x86_64' architecture for now
 if test "$cpu" = "x86_64" -a "$libverbs" = "yes" -a "$rdmacm" = "yes" \
-    -a "$librpma" = "yes" -a "$libpmem" = "yes" ; then
+    -a "$librpma" = "yes" \
+    && test "$libpmem" = "yes" -o "$libpmem2" = "yes" ; then
   output_sym "CONFIG_LIBRPMA_APM"
 fi
 if test "$cpu" = "x86_64" -a "$libverbs" = "yes" -a "$rdmacm" = "yes" \
-    -a "$librpma" = "yes" -a "$libpmem" = "yes" -a "$libprotobuf_c" = "yes" ; then
+    -a "$librpma" = "yes" -a "$libprotobuf_c" = "yes" \
+    && test "$libpmem" = "yes" -o "$libpmem2" = "yes" ; then
   output_sym "CONFIG_LIBRPMA_GPSPM"
 fi
 if test "$clock_gettime" = "yes" ; then
@@ -3138,6 +3160,9 @@ fi
 if test "$pmem" = "yes" ; then
   output_sym "CONFIG_LIBPMEM"
 fi
+if test "$libpmem2" = "yes" ; then
+  output_sym "CONFIG_LIBPMEM2_INSTALLED"
+fi
 if test "$libime" = "yes" ; then
   output_sym "CONFIG_IME"
 fi
engines/librpma_fio.c +14 -38

88 lines not on this page · raw message

engines/librpma_fio.h +6 -1
index 91290235..480ded1b 100644
@@ -1,7 +1,7 @@
 /*
  * librpma_fio: librpma_apm and librpma_gpspm engines' common header.
  *
- * Copyright 2021, Intel Corporation
+ * Copyright 2021-2022, Intel Corporation
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License,
@@ -72,6 +72,11 @@ struct librpma_fio_mem {
 
 	/* size of the mapped persistent memory */
 	size_t size_mmap;
+
+#ifdef CONFIG_LIBPMEM2_INSTALLED
+	/* libpmem2 structure used for mapping PMem */
+	struct pmem2_map *map;
+#endif
 };
 
 char *librpma_fio_allocate_dram(struct thread_data *td, size_t size,
engines/librpma_fio_pmem.h new file +67 -0

67 lines not on this page · raw message

engines/librpma_fio_pmem2.h new file +91 -0

91 lines not on this page · raw message

engines/librpma_gpspm.c +35 -24

103 lines not on this page · raw message