bdev/pmem: change all NVML strings to PMDK

NVML (Non Volatile Memory Library) changed its name to
PMDK (Persistent Memory Development Kit), so make the
necessary changes to the SPDK repository.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: Id07a87eafb4e9a3099603030c58c0e927bafa608

Reviewed-on: https://review.gerrithub.io/406256
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
Jim Harris 2018-04-03 16:07:39 -07:00 committed by Daniel Verkamp
parent 6e1611da18
commit 218dcd840a
15 changed files with 42 additions and 33 deletions

View File

@ -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 experimental pending additional features and tests. More details can be found in
lib/bdev/iscsi/README. 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 ## v18.01: Blobstore Thin Provisioning
### Build System ### Build System

4
CONFIG
View File

@ -90,8 +90,8 @@ CONFIG_VHOST?=y
# Build vhost initiator (Virtio) driver. # Build vhost initiator (Virtio) driver.
CONFIG_VIRTIO?=y CONFIG_VIRTIO?=y
# Build with NVML backends # Build with PMDK backends
CONFIG_NVML?=n CONFIG_PMDK?=n
# Build with VPP # Build with VPP
CONFIG_VPP?=n CONFIG_VPP?=n

View File

@ -204,7 +204,7 @@ if [ $SPDK_TEST_VHOST_INIT -eq 1 ]; then
report_test_completion "vhost_initiator" report_test_completion "vhost_initiator"
fi fi
if [ $SPDK_TEST_NVML -eq 1 ]; then if [ $SPDK_TEST_PMDK -eq 1 ]; then
run_test ./test/pmem/pmem.sh -x run_test ./test/pmem/pmem.sh -x
fi fi

26
configure vendored
View File

@ -39,8 +39,8 @@ function usage()
echo " No path required." echo " No path required."
echo " virtio Required to build vhost initiator (Virtio) bdev module." echo " virtio Required to build vhost initiator (Virtio) bdev module."
echo " No path required." echo " No path required."
echo " nvml Required to build persistent memory bdev." echo " pmdk Required to build persistent memory bdev."
echo " example: /usr/share/nvml" echo " example: /usr/share/pmdk"
echo " vpp Required to build VPP net module." echo " vpp Required to build VPP net module."
echo " example: /vpp_repo/build-root/install-vpp-native/vpp" echo " example: /vpp_repo/build-root/install-vpp-native/vpp"
echo " rbd [disabled]" echo " rbd [disabled]"
@ -167,16 +167,16 @@ for i in "$@"; do
--without-virtio) --without-virtio)
CONFIG_VIRTIO=n CONFIG_VIRTIO=n
;; ;;
--with-nvml) --with-pmdk)
CONFIG_NVML=y CONFIG_PMDK=y
;; ;;
--with-nvml=*) --with-pmdk=*)
CONFIG_NVML=y CONFIG_PMDK=y
check_dir "$i" check_dir "$i"
CONFIG_NVML_DIR=$(readlink -f ${i#*=}) CONFIG_PMDK_DIR=$(readlink -f ${i#*=})
;; ;;
--without-nvml) --without-pmdk)
CONFIG_NVML=n CONFIG_PMDK=n
;; ;;
--with-vpp) --with-vpp)
CONFIG_VPP=y CONFIG_VPP=y
@ -300,11 +300,11 @@ fi
if [ -n "$CONFIG_VIRTIO" ]; then if [ -n "$CONFIG_VIRTIO" ]; then
echo "CONFIG_VIRTIO?=$CONFIG_VIRTIO" >> CONFIG.local echo "CONFIG_VIRTIO?=$CONFIG_VIRTIO" >> CONFIG.local
fi fi
if [ -n "$CONFIG_NVML" ]; then if [ -n "$CONFIG_PMDK" ]; then
echo "CONFIG_NVML?=$CONFIG_NVML" >> CONFIG.local echo "CONFIG_PMDK?=$CONFIG_PMDK" >> CONFIG.local
fi fi
if [ -n "$CONFIG_NVML_DIR" ]; then if [ -n "$CONFIG_PMDK_DIR" ]; then
echo "CONFIG_NVML_DIR?=$CONFIG_NVML_DIR" >> CONFIG.local echo "CONFIG_PMDK_DIR?=$CONFIG_PMDK_DIR" >> CONFIG.local
fi fi
if [ -n "$CONFIG_VPP" ]; then if [ -n "$CONFIG_VPP" ]; then
echo "CONFIG_VPP?=$CONFIG_VPP" >> CONFIG.local echo "CONFIG_VPP?=$CONFIG_VPP" >> CONFIG.local

View File

@ -250,9 +250,9 @@ Example commands
The SPDK pmem bdev driver uses pmemblk pool as the target for block I/O operations. For 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. 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. To create pmemblk pool for use with SPDK user should use `create_pmem_pool` RPC command.

View File

@ -48,7 +48,7 @@ ifeq ($(OS),Linux)
DIRS-y += aio DIRS-y += aio
DIRS-$(CONFIG_ISCSI_INITIATOR) += iscsi DIRS-$(CONFIG_ISCSI_INITIATOR) += iscsi
DIRS-$(CONFIG_VIRTIO) += virtio DIRS-$(CONFIG_VIRTIO) += virtio
DIRS-$(CONFIG_NVML) += pmem DIRS-$(CONFIG_PMDK) += pmem
endif endif
DIRS-$(CONFIG_RBD) += rbd DIRS-$(CONFIG_RBD) += rbd

View File

@ -114,10 +114,10 @@ LIBS += -L/usr/local/lib
COMMON_CFLAGS += -I/usr/local/include COMMON_CFLAGS += -I/usr/local/include
endif endif
# Attach only if NVML lib specified with configure # Attach only if PMDK lib specified with configure
ifneq ($(CONFIG_NVML_DIR),) ifneq ($(CONFIG_PMDK_DIR),)
LIBS += -L$(CONFIG_NVML_DIR)/src/nondebug LIBS += -L$(CONFIG_PMDK_DIR)/src/nondebug
COMMON_CFLAGS += -I$(CONFIG_NVML_DIR)/src/include COMMON_CFLAGS += -I$(CONFIG_PMDK_DIR)/src/include
endif endif
ifneq ($(CONFIG_VPP_DIR),) ifneq ($(CONFIG_VPP_DIR),)

View File

@ -55,7 +55,7 @@ BLOCKDEV_MODULES_LIST += bdev_rbd
BLOCKDEV_MODULES_DEPS += -lrados -lrbd BLOCKDEV_MODULES_DEPS += -lrados -lrbd
endif endif
ifeq ($(CONFIG_NVML),y) ifeq ($(CONFIG_PMDK),y)
BLOCKDEV_MODULES_LIST += bdev_pmem BLOCKDEV_MODULES_LIST += bdev_pmem
BLOCKDEV_MODULES_DEPS += -lpmemblk BLOCKDEV_MODULES_DEPS += -lpmemblk
endif endif

View File

@ -18,7 +18,7 @@ if [ -s /etc/redhat-release ]; then
yum install -y numactl-devel yum install -y numactl-devel
# Additional dependencies for building docs # Additional dependencies for building docs
yum install -y doxygen mscgen graphviz 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 yum install -y libpmemblk-devel || true
elif [ -f /etc/debian_version ]; then elif [ -f /etc/debian_version ]; then
# Includes Ubuntu, Debian # Includes Ubuntu, Debian

View File

@ -39,7 +39,7 @@ fi
: ${SPDK_TEST_EVENT=1}; export SPDK_TEST_EVENT : ${SPDK_TEST_EVENT=1}; export SPDK_TEST_EVENT
: ${SPDK_TEST_BLOBFS=1}; export SPDK_TEST_BLOBFS : ${SPDK_TEST_BLOBFS=1}; export SPDK_TEST_BLOBFS
: ${SPDK_TEST_VHOST_INIT=1}; export SPDK_TEST_VHOST_INIT : ${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_TEST_LVOL=1}; export SPDK_TEST_LVOL
: ${SPDK_RUN_ASAN=1}; export SPDK_RUN_ASAN : ${SPDK_RUN_ASAN=1}; export SPDK_RUN_ASAN
: ${SPDK_RUN_UBSAN=1}; export SPDK_RUN_UBSAN : ${SPDK_RUN_UBSAN=1}; export SPDK_RUN_UBSAN
@ -106,7 +106,10 @@ if [ -f /usr/include/infiniband/verbs.h ]; then
fi fi
if [ -f /usr/include/libpmemblk.h ]; then 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 fi
if [ -d /usr/src/fio ]; then if [ -d /usr/src/fio ]; then

View File

@ -190,7 +190,7 @@ SPDK_TEST_BLOCKDEV=1
SPDK_TEST_IOAT=0 SPDK_TEST_IOAT=0
SPDK_TEST_EVENT=1 SPDK_TEST_EVENT=1
SPDK_TEST_BLOBFS=1 SPDK_TEST_BLOBFS=1
SPDK_TEST_NVML=1 SPDK_TEST_PMDK=1
SPDK_RUN_ASAN=1 SPDK_RUN_ASAN=1
SPDK_RUN_UBSAN=1 SPDK_RUN_UBSAN=1
EOF EOF

View File

@ -29,7 +29,7 @@ run_test ./test/iscsi_tgt/lvol/iscsi_lvol.sh
run_test ./test/iscsi_tgt/fio/fio.sh run_test ./test/iscsi_tgt/fio/fio.sh
if [ $RUN_NIGHTLY -eq 1 ]; then 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 run_test ./test/iscsi_tgt/pmem/iscsi_pmem.sh 4096 10
fi fi
run_test ./test/iscsi_tgt/ip_migration/ip_migration.sh run_test ./test/iscsi_tgt/ip_migration/ip_migration.sh

View File

@ -61,9 +61,9 @@ Steps & expected results:
From libpmemblk documentation: From libpmemblk documentation:
- PMEM block size has to be bigger than 512 internal blocks; if lower value - 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 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 - 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 - Total number of segments in PMEP pool file cannot be less than 256
#### create_pmem_pool_tc1 #### create_pmem_pool_tc1

View File

@ -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-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) .PHONY: all clean $(DIRS-y)

View File

@ -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/gpt/gpt.c/gpt_ut
$valgrind $testdir/lib/bdev/vbdev_lvol.c/vbdev_lvol_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 $valgrind $testdir/lib/bdev/pmem/bdev_pmem_ut
fi fi