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
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

4
CONFIG
View File

@ -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

View File

@ -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

26
configure vendored
View File

@ -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

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
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.

View File

@ -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

View File

@ -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),)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

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-$(CONFIG_NVML) += pmem
DIRS-$(CONFIG_PMDK) += pmem
.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/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