diff --git a/CHANGELOG.md b/CHANGELOG.md index 02ceff000..f2b4b3627 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -70,6 +70,12 @@ An iSCSI initiator bdev module has been added to SPDK. This module should be co experimental pending additional features and tests. More details can be found in lib/bdev/iscsi/README. +### PMDK + +The persistent memory (PMDK) bdev module is now enabled using --with-pmdk instead of +--with-nvml. This reflects the renaming of the persistent memory library from NVML to +PMDK. + ## v18.01: Blobstore Thin Provisioning ### Build System diff --git a/CONFIG b/CONFIG index 363a5d657..d503629ae 100644 --- a/CONFIG +++ b/CONFIG @@ -90,8 +90,8 @@ CONFIG_VHOST?=y # Build vhost initiator (Virtio) driver. CONFIG_VIRTIO?=y -# Build with NVML backends -CONFIG_NVML?=n +# Build with PMDK backends +CONFIG_PMDK?=n # Build with VPP CONFIG_VPP?=n diff --git a/autotest.sh b/autotest.sh index f71ddd759..de9217f42 100755 --- a/autotest.sh +++ b/autotest.sh @@ -204,7 +204,7 @@ if [ $SPDK_TEST_VHOST_INIT -eq 1 ]; then report_test_completion "vhost_initiator" fi -if [ $SPDK_TEST_NVML -eq 1 ]; then +if [ $SPDK_TEST_PMDK -eq 1 ]; then run_test ./test/pmem/pmem.sh -x fi diff --git a/configure b/configure index f8b77c747..e1b1eb0bd 100755 --- a/configure +++ b/configure @@ -39,8 +39,8 @@ function usage() echo " No path required." echo " virtio Required to build vhost initiator (Virtio) bdev module." echo " No path required." - echo " nvml Required to build persistent memory bdev." - echo " example: /usr/share/nvml" + echo " pmdk Required to build persistent memory bdev." + echo " example: /usr/share/pmdk" echo " vpp Required to build VPP net module." echo " example: /vpp_repo/build-root/install-vpp-native/vpp" echo " rbd [disabled]" @@ -167,16 +167,16 @@ for i in "$@"; do --without-virtio) CONFIG_VIRTIO=n ;; - --with-nvml) - CONFIG_NVML=y + --with-pmdk) + CONFIG_PMDK=y ;; - --with-nvml=*) - CONFIG_NVML=y + --with-pmdk=*) + CONFIG_PMDK=y check_dir "$i" - CONFIG_NVML_DIR=$(readlink -f ${i#*=}) + CONFIG_PMDK_DIR=$(readlink -f ${i#*=}) ;; - --without-nvml) - CONFIG_NVML=n + --without-pmdk) + CONFIG_PMDK=n ;; --with-vpp) CONFIG_VPP=y @@ -300,11 +300,11 @@ fi if [ -n "$CONFIG_VIRTIO" ]; then echo "CONFIG_VIRTIO?=$CONFIG_VIRTIO" >> CONFIG.local fi -if [ -n "$CONFIG_NVML" ]; then - echo "CONFIG_NVML?=$CONFIG_NVML" >> CONFIG.local +if [ -n "$CONFIG_PMDK" ]; then + echo "CONFIG_PMDK?=$CONFIG_PMDK" >> CONFIG.local fi -if [ -n "$CONFIG_NVML_DIR" ]; then - echo "CONFIG_NVML_DIR?=$CONFIG_NVML_DIR" >> CONFIG.local +if [ -n "$CONFIG_PMDK_DIR" ]; then + echo "CONFIG_PMDK_DIR?=$CONFIG_PMDK_DIR" >> CONFIG.local fi if [ -n "$CONFIG_VPP" ]; then echo "CONFIG_VPP?=$CONFIG_VPP" >> CONFIG.local diff --git a/doc/bdev.md b/doc/bdev.md index e0f262b1d..8e1abb4ac 100644 --- a/doc/bdev.md +++ b/doc/bdev.md @@ -250,9 +250,9 @@ Example commands The SPDK pmem bdev driver uses pmemblk pool as the target for block I/O operations. For details on Pmem memory please refer to PMDK documentation on http://pmem.io website. -First, user needs to compile SPDK with NVML library: +First, user needs to configure SPDK to include PMDK support: -`configure --with-nvml` +`configure --with-pmdk` To create pmemblk pool for use with SPDK user should use `create_pmem_pool` RPC command. diff --git a/lib/bdev/Makefile b/lib/bdev/Makefile index 3abf6fd2c..e5291212d 100644 --- a/lib/bdev/Makefile +++ b/lib/bdev/Makefile @@ -48,7 +48,7 @@ ifeq ($(OS),Linux) DIRS-y += aio DIRS-$(CONFIG_ISCSI_INITIATOR) += iscsi DIRS-$(CONFIG_VIRTIO) += virtio -DIRS-$(CONFIG_NVML) += pmem +DIRS-$(CONFIG_PMDK) += pmem endif DIRS-$(CONFIG_RBD) += rbd diff --git a/mk/spdk.common.mk b/mk/spdk.common.mk index 80aa0b09b..7326e7869 100644 --- a/mk/spdk.common.mk +++ b/mk/spdk.common.mk @@ -114,10 +114,10 @@ LIBS += -L/usr/local/lib COMMON_CFLAGS += -I/usr/local/include endif -# Attach only if NVML lib specified with configure -ifneq ($(CONFIG_NVML_DIR),) -LIBS += -L$(CONFIG_NVML_DIR)/src/nondebug -COMMON_CFLAGS += -I$(CONFIG_NVML_DIR)/src/include +# Attach only if PMDK lib specified with configure +ifneq ($(CONFIG_PMDK_DIR),) +LIBS += -L$(CONFIG_PMDK_DIR)/src/nondebug +COMMON_CFLAGS += -I$(CONFIG_PMDK_DIR)/src/include endif ifneq ($(CONFIG_VPP_DIR),) diff --git a/mk/spdk.modules.mk b/mk/spdk.modules.mk index 9399ef6df..f0e107597 100644 --- a/mk/spdk.modules.mk +++ b/mk/spdk.modules.mk @@ -55,7 +55,7 @@ BLOCKDEV_MODULES_LIST += bdev_rbd BLOCKDEV_MODULES_DEPS += -lrados -lrbd endif -ifeq ($(CONFIG_NVML),y) +ifeq ($(CONFIG_PMDK),y) BLOCKDEV_MODULES_LIST += bdev_pmem BLOCKDEV_MODULES_DEPS += -lpmemblk endif diff --git a/scripts/pkgdep.sh b/scripts/pkgdep.sh index adde27a29..4b5b2c61d 100755 --- a/scripts/pkgdep.sh +++ b/scripts/pkgdep.sh @@ -18,7 +18,7 @@ if [ -s /etc/redhat-release ]; then yum install -y numactl-devel # Additional dependencies for building docs yum install -y doxygen mscgen graphviz - # Additional dependencies for building nvml based backends + # Additional dependencies for building pmem based backends yum install -y libpmemblk-devel || true elif [ -f /etc/debian_version ]; then # Includes Ubuntu, Debian diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 68f0c90da..a418fb0e5 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -39,7 +39,7 @@ fi : ${SPDK_TEST_EVENT=1}; export SPDK_TEST_EVENT : ${SPDK_TEST_BLOBFS=1}; export SPDK_TEST_BLOBFS : ${SPDK_TEST_VHOST_INIT=1}; export SPDK_TEST_VHOST_INIT -: ${SPDK_TEST_NVML=1}; export SPDK_TEST_NVML +: ${SPDK_TEST_PMDK=1}; export SPDK_TEST_PMDK : ${SPDK_TEST_LVOL=1}; export SPDK_TEST_LVOL : ${SPDK_RUN_ASAN=1}; export SPDK_RUN_ASAN : ${SPDK_RUN_UBSAN=1}; export SPDK_RUN_UBSAN @@ -106,7 +106,10 @@ if [ -f /usr/include/infiniband/verbs.h ]; then fi if [ -f /usr/include/libpmemblk.h ]; then - config_params+=' --with-nvml' + config_params+=' --with-pmdk' +else + # PMDK not installed so disable PMDK tests explicitly here + SPDK_TEST_PMDK=0; export SPDK_TEST_PMDK fi if [ -d /usr/src/fio ]; then diff --git a/test/common/config/vm_setup.sh b/test/common/config/vm_setup.sh index 24e71efb7..a284b68ef 100755 --- a/test/common/config/vm_setup.sh +++ b/test/common/config/vm_setup.sh @@ -190,7 +190,7 @@ SPDK_TEST_BLOCKDEV=1 SPDK_TEST_IOAT=0 SPDK_TEST_EVENT=1 SPDK_TEST_BLOBFS=1 -SPDK_TEST_NVML=1 +SPDK_TEST_PMDK=1 SPDK_RUN_ASAN=1 SPDK_RUN_UBSAN=1 EOF diff --git a/test/iscsi_tgt/iscsi_tgt.sh b/test/iscsi_tgt/iscsi_tgt.sh index d28be1250..e1baa15da 100755 --- a/test/iscsi_tgt/iscsi_tgt.sh +++ b/test/iscsi_tgt/iscsi_tgt.sh @@ -29,7 +29,7 @@ run_test ./test/iscsi_tgt/lvol/iscsi_lvol.sh run_test ./test/iscsi_tgt/fio/fio.sh if [ $RUN_NIGHTLY -eq 1 ]; then - if [ $SPDK_TEST_NVML -eq 1 ]; then + if [ $SPDK_TEST_PMDK -eq 1 ]; then run_test ./test/iscsi_tgt/pmem/iscsi_pmem.sh 4096 10 fi run_test ./test/iscsi_tgt/ip_migration/ip_migration.sh diff --git a/test/pmem/test_plan.md b/test/pmem/test_plan.md index 59af8eb5e..18e99f364 100644 --- a/test/pmem/test_plan.md +++ b/test/pmem/test_plan.md @@ -61,9 +61,9 @@ Steps & expected results: From libpmemblk documentation: - PMEM block size has to be bigger than 512 internal blocks; if lower value is used then PMEM library will silently round it up to 512 which is defined -in nvml/libpmemblk.h file as PMEMBLK_MIN_BLK. +in pmem/libpmemblk.h file as PMEMBLK_MIN_BLK. - Total pool size cannot be less than 16MB which is defined i -nvml/libpmemblk.h file as PMEMBLK_MIN_POOL +pmem/libpmemblk.h file as PMEMBLK_MIN_POOL - Total number of segments in PMEP pool file cannot be less than 256 #### create_pmem_pool_tc1 diff --git a/test/unit/lib/bdev/Makefile b/test/unit/lib/bdev/Makefile index e77b5f04d..d105e8450 100644 --- a/test/unit/lib/bdev/Makefile +++ b/test/unit/lib/bdev/Makefile @@ -36,7 +36,7 @@ include $(SPDK_ROOT_DIR)/mk/spdk.common.mk DIRS-y = bdev.c part.c scsi_nvme.c gpt vbdev_lvol.c mt -DIRS-$(CONFIG_NVML) += pmem +DIRS-$(CONFIG_PMDK) += pmem .PHONY: all clean $(DIRS-y) diff --git a/test/unit/unittest.sh b/test/unit/unittest.sh index 7168b496b..2af1bccfb 100755 --- a/test/unit/unittest.sh +++ b/test/unit/unittest.sh @@ -51,7 +51,7 @@ $valgrind $testdir/lib/bdev/scsi_nvme.c/scsi_nvme_ut $valgrind $testdir/lib/bdev/gpt/gpt.c/gpt_ut $valgrind $testdir/lib/bdev/vbdev_lvol.c/vbdev_lvol_ut -if grep -q '#define SPDK_CONFIG_NVML 1' $rootdir/config.h; then +if grep -q '#define SPDK_CONFIG_PMDK 1' $rootdir/config.h; then $valgrind $testdir/lib/bdev/pmem/bdev_pmem_ut fi