build: Place fio plugins into build/fio
This makes them easier to find. They are now named spdk_nvme and spdk_bdev. Signed-off-by: Ben Walker <benjamin.walker@intel.com> Change-Id: I1f6736d8f7f5b9669583731fb0b710ba54f0d50a Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2679 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
This commit is contained in:
parent
6b9b448e53
commit
c3b5ae0c60
@ -13,6 +13,11 @@ Command line parameters `-r` and `--rpc-socket` will longer accept TCP ports. RP
|
|||||||
must now be started on a Unix domain socket. Exposing RPC on the network, as well as providing
|
must now be started on a Unix domain socket. Exposing RPC on the network, as well as providing
|
||||||
proper authentication (if needed) is now a responsibility of the user.
|
proper authentication (if needed) is now a responsibility of the user.
|
||||||
|
|
||||||
|
### build
|
||||||
|
|
||||||
|
The fio plugins now compile to `build/fio` and are named `spdk_bdev` and `spdk_nvme`.
|
||||||
|
Existing fio configuration files will need to be updated.
|
||||||
|
|
||||||
### accel
|
### accel
|
||||||
|
|
||||||
A new API was added `spdk_accel_get_capabilities` that allows applications to
|
A new API was added `spdk_accel_get_capabilities` that allows applications to
|
||||||
|
2
Makefile
2
Makefile
@ -78,6 +78,7 @@ all: mk/cc.mk $(DIRS-y)
|
|||||||
clean: $(DIRS-y)
|
clean: $(DIRS-y)
|
||||||
$(Q)rm -f include/spdk/config.h
|
$(Q)rm -f include/spdk/config.h
|
||||||
$(Q)rm -rf build/bin
|
$(Q)rm -rf build/bin
|
||||||
|
$(Q)rm -rf build/fio
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
$(Q)echo "Installed to $(DESTDIR)$(CONFIG_PREFIX)"
|
$(Q)echo "Installed to $(DESTDIR)$(CONFIG_PREFIX)"
|
||||||
@ -107,6 +108,7 @@ mk/cc.mk:
|
|||||||
build_dir: mk/cc.mk
|
build_dir: mk/cc.mk
|
||||||
$(Q)mkdir -p build/lib
|
$(Q)mkdir -p build/lib
|
||||||
$(Q)mkdir -p build/bin
|
$(Q)mkdir -p build/bin
|
||||||
|
$(Q)mkdir -p build/fio
|
||||||
|
|
||||||
include/spdk/config.h: mk/config.mk scripts/genconfig.py
|
include/spdk/config.h: mk/config.mk scripts/genconfig.py
|
||||||
$(Q)echo "#ifndef SPDK_CONFIG_H" > $@.tmp; \
|
$(Q)echo "#ifndef SPDK_CONFIG_H" > $@.tmp; \
|
||||||
|
@ -36,15 +36,13 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..)
|
|||||||
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk
|
||||||
|
|
||||||
APP := fio_plugin
|
FIO_PLUGIN := spdk_bdev
|
||||||
|
|
||||||
C_SRCS = fio_plugin.c
|
C_SRCS = fio_plugin.c
|
||||||
CFLAGS += -I$(CONFIG_FIO_SOURCE_DIR)
|
|
||||||
LDFLAGS += -shared -rdynamic -Wl,-z,nodelete
|
|
||||||
|
|
||||||
# Unable to combine the FIO plugin and the VPP socket abstraction (license incompatibility)
|
# Unable to combine the FIO plugin and the VPP socket abstraction (license incompatibility)
|
||||||
SPDK_LIB_LIST = $(filter-out sock_vpp,$(ALL_MODULES_LIST))
|
SPDK_LIB_LIST = $(filter-out sock_vpp,$(ALL_MODULES_LIST))
|
||||||
SPDK_LIB_LIST += thread util bdev bdev_rpc conf accel rpc jsonrpc json log sock trace notify
|
SPDK_LIB_LIST += thread util bdev bdev_rpc conf accel rpc jsonrpc json log sock trace notify
|
||||||
SPDK_LIB_LIST += event event_bdev event_accel event_vmd
|
SPDK_LIB_LIST += event event_bdev event_accel event_vmd
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/spdk.app.mk
|
include $(SPDK_ROOT_DIR)/mk/spdk.fio.mk
|
||||||
|
@ -45,7 +45,7 @@ To use the SPDK fio plugin with fio, specify the plugin binary using LD_PRELOAD
|
|||||||
fio and set ioengine=spdk_bdev in the fio configuration file (see example_config.fio in the same
|
fio and set ioengine=spdk_bdev in the fio configuration file (see example_config.fio in the same
|
||||||
directory as this README).
|
directory as this README).
|
||||||
|
|
||||||
LD_PRELOAD=<path to spdk repo>/examples/bdev/fio_plugin/fio_plugin fio
|
LD_PRELOAD=<path to spdk repo>/build/fio/spdk_bdev fio
|
||||||
|
|
||||||
The fio configuration file must contain one new parameter:
|
The fio configuration file must contain one new parameter:
|
||||||
|
|
||||||
|
@ -32,11 +32,20 @@
|
|||||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#
|
#
|
||||||
|
|
||||||
SPDK_ROOT_DIR := $(CURDIR)/../../..
|
SPDK_ROOT_DIR := $(abspath $(CURDIR)/../../..)
|
||||||
|
include $(SPDK_ROOT_DIR)/mk/spdk.common.mk
|
||||||
|
include $(SPDK_ROOT_DIR)/mk/spdk.modules.mk
|
||||||
|
|
||||||
APP := fio_plugin
|
FIO_PLUGIN := spdk_nvme
|
||||||
|
|
||||||
CFLAGS += -I$(CONFIG_FIO_SOURCE_DIR)
|
C_SRCS = fio_plugin.c
|
||||||
LDFLAGS += -shared -rdynamic
|
|
||||||
|
|
||||||
include $(SPDK_ROOT_DIR)/mk/nvme.libtest.mk
|
# Unable to combine the FIO plugin and the VPP socket abstraction (license incompatibility)
|
||||||
|
SPDK_LIB_LIST = $(filter-out sock_vpp,$(SOCK_MODULES_LIST))
|
||||||
|
SPDK_LIB_LIST += nvme thread util log sock vmd
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_RDMA),y)
|
||||||
|
SPDK_LIB_LIST += rdma
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(SPDK_ROOT_DIR)/mk/spdk.fio.mk
|
||||||
|
@ -36,7 +36,7 @@ To use the SPDK fio plugin with fio, specify the plugin binary using LD_PRELOAD
|
|||||||
fio and set ioengine=spdk in the fio configuration file (see example_config.fio in the same
|
fio and set ioengine=spdk in the fio configuration file (see example_config.fio in the same
|
||||||
directory as this README).
|
directory as this README).
|
||||||
|
|
||||||
LD_PRELOAD=<path to spdk repo>/examples/nvme/fio_plugin/fio_plugin fio
|
LD_PRELOAD=<path to spdk repo>/build/fio/spdk_nvme fio
|
||||||
|
|
||||||
To select NVMe devices, you pass an SPDK Transport Identifier string as the filename. These are in the
|
To select NVMe devices, you pass an SPDK Transport Identifier string as the filename. These are in the
|
||||||
form:
|
form:
|
||||||
|
63
mk/spdk.fio.mk
Normal file
63
mk/spdk.fio.mk
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
#
|
||||||
|
# BSD LICENSE
|
||||||
|
#
|
||||||
|
# Copyright (c) Intel Corporation.
|
||||||
|
# All rights reserved.
|
||||||
|
#
|
||||||
|
# Redistribution and use in source and binary forms, with or without
|
||||||
|
# modification, are permitted provided that the following conditions
|
||||||
|
# are met:
|
||||||
|
#
|
||||||
|
# * Redistributions of source code must retain the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer.
|
||||||
|
# * Redistributions in binary form must reproduce the above copyright
|
||||||
|
# notice, this list of conditions and the following disclaimer in
|
||||||
|
# the documentation and/or other materials provided with the
|
||||||
|
# distribution.
|
||||||
|
# * Neither the name of Intel Corporation nor the names of its
|
||||||
|
# contributors may be used to endorse or promote products derived
|
||||||
|
# from this software without specific prior written permission.
|
||||||
|
#
|
||||||
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(SPDK_ROOT_DIR)/mk/spdk.app_vars.mk
|
||||||
|
|
||||||
|
# Plugins go into build/example/
|
||||||
|
FIO_PLUGIN := $(SPDK_ROOT_DIR)/build/fio/$(notdir $(FIO_PLUGIN))
|
||||||
|
|
||||||
|
LIBS += $(SPDK_LIB_LINKER_ARGS)
|
||||||
|
|
||||||
|
CFLAGS += -I$(CONFIG_FIO_SOURCE_DIR)
|
||||||
|
LDFLAGS += -shared -rdynamic -Wl,-z,nodelete
|
||||||
|
|
||||||
|
CLEAN_FILES = $(FIO_PLUGIN)
|
||||||
|
|
||||||
|
all : $(FIO_PLUGIN)
|
||||||
|
@:
|
||||||
|
|
||||||
|
install: empty_rule
|
||||||
|
|
||||||
|
uninstall: empty_rule
|
||||||
|
|
||||||
|
# To avoid overwriting warning
|
||||||
|
empty_rule:
|
||||||
|
@:
|
||||||
|
|
||||||
|
$(FIO_PLUGIN) : $(OBJS) $(SPDK_LIB_FILES) $(ENV_LIBS)
|
||||||
|
$(LINK_C)
|
||||||
|
|
||||||
|
clean :
|
||||||
|
$(CLEAN_C) $(CLEAN_FILES)
|
||||||
|
|
||||||
|
include $(SPDK_ROOT_DIR)/mk/spdk.deps.mk
|
@ -7,13 +7,13 @@ rootdir=$(readlink -f $testdir/../../..)
|
|||||||
$rootdir/scripts/setup.sh
|
$rootdir/scripts/setup.sh
|
||||||
|
|
||||||
# Run Performance Test with 1 SSD
|
# Run Performance Test with 1 SSD
|
||||||
$testdir/run_fio_test.py $testdir/fio_test.conf $rootdir/examples/nvme/fio_plugin/fio_plugin 1
|
$testdir/run_fio_test.py $testdir/fio_test.conf $rootdir/build/fio/spdk_nvme 1
|
||||||
|
|
||||||
# 2 SSDs test run
|
# 2 SSDs test run
|
||||||
$testdir/run_fio_test.py $testdir/fio_test.conf $rootdir/examples/nvme/fio_plugin/fio_plugin 2
|
$testdir/run_fio_test.py $testdir/fio_test.conf $rootdir/build/fio/spdk_nvme 2
|
||||||
|
|
||||||
# 4 SSDs test run
|
# 4 SSDs test run
|
||||||
$testdir/run_fio_test.py $testdir/fio_test.conf $rootdir/examples/nvme/fio_plugin/fio_plugin 4
|
$testdir/run_fio_test.py $testdir/fio_test.conf $rootdir/build/fio/spdk_nvme 4
|
||||||
|
|
||||||
# 8 SSDs test run
|
# 8 SSDs test run
|
||||||
$testdir/run_fio_test.py $testdir/fio_test.conf $rootdir/examples/nvme/fio_plugin/fio_plugin 8
|
$testdir/run_fio_test.py $testdir/fio_test.conf $rootdir/build/fio/spdk_nvme 8
|
||||||
|
@ -326,7 +326,7 @@ runtime={run_time}
|
|||||||
subsystems = self.discover_subsystems(self.nic_ips, subsys_no)
|
subsystems = self.discover_subsystems(self.nic_ips, subsys_no)
|
||||||
bdev_conf = self.gen_spdk_bdev_conf(subsystems)
|
bdev_conf = self.gen_spdk_bdev_conf(subsystems)
|
||||||
self.remote_call("echo '%s' > %s/bdev.conf" % (bdev_conf, self.spdk_dir))
|
self.remote_call("echo '%s' > %s/bdev.conf" % (bdev_conf, self.spdk_dir))
|
||||||
ioengine = "%s/examples/bdev/fio_plugin/fio_plugin" % self.spdk_dir
|
ioengine = "%s/build/fio/spdk_bdev" % self.spdk_dir
|
||||||
spdk_conf = "spdk_conf=%s/bdev.conf" % self.spdk_dir
|
spdk_conf = "spdk_conf=%s/bdev.conf" % self.spdk_dir
|
||||||
else:
|
else:
|
||||||
ioengine = "libaio"
|
ioengine = "libaio"
|
||||||
|
@ -1074,7 +1074,7 @@ EOL
|
|||||||
function fio_bdev() {
|
function fio_bdev() {
|
||||||
# Setup fio binary cmd line
|
# Setup fio binary cmd line
|
||||||
local fio_dir=$CONFIG_FIO_SOURCE_DIR
|
local fio_dir=$CONFIG_FIO_SOURCE_DIR
|
||||||
local bdev_plugin="$rootdir/examples/bdev/fio_plugin/fio_plugin"
|
local bdev_plugin="$rootdir/build/fio/spdk_bdev"
|
||||||
|
|
||||||
# Preload AddressSanitizer library to fio if fio_plugin was compiled with it
|
# Preload AddressSanitizer library to fio if fio_plugin was compiled with it
|
||||||
local asan_lib
|
local asan_lib
|
||||||
@ -1086,7 +1086,7 @@ function fio_bdev() {
|
|||||||
function fio_nvme() {
|
function fio_nvme() {
|
||||||
# Setup fio binary cmd line
|
# Setup fio binary cmd line
|
||||||
local fio_dir=$CONFIG_FIO_SOURCE_DIR
|
local fio_dir=$CONFIG_FIO_SOURCE_DIR
|
||||||
local nvme_plugin="$rootdir/examples/nvme/fio_plugin/fio_plugin"
|
local nvme_plugin="$rootdir/build/fio/spdk_nvme"
|
||||||
|
|
||||||
# Preload AddressSanitizer library to fio if fio_plugin was compiled with it
|
# Preload AddressSanitizer library to fio if fio_plugin was compiled with it
|
||||||
asan_lib=$(ldd $nvme_plugin | grep libasan | awk '{print $3}')
|
asan_lib=$(ldd $nvme_plugin | grep libasan | awk '{print $3}')
|
||||||
|
@ -24,10 +24,9 @@ function nvme_perf() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function nvme_fio_test() {
|
function nvme_fio_test() {
|
||||||
PLUGIN_DIR=$rootdir/examples/nvme/fio_plugin
|
|
||||||
for bdf in $(get_nvme_bdfs); do
|
for bdf in $(get_nvme_bdfs); do
|
||||||
for blkname in $(get_nvme_name_from_bdf $bdf); do
|
for blkname in $(get_nvme_name_from_bdf $bdf); do
|
||||||
fio_nvme $PLUGIN_DIR/example_config.fio --filename="trtype=PCIe traddr=${bdf//:/.} ns=${blkname##*n}"
|
fio_nvme $rootdir/examples/nvme/fio_plugin/example_config.fio --filename="trtype=PCIe traddr=${bdf//:/.} ns=${blkname##*n}"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -4,8 +4,7 @@ set -e
|
|||||||
BASE_DIR=$(readlink -f $(dirname $0))
|
BASE_DIR=$(readlink -f $(dirname $0))
|
||||||
ROOT_DIR=$(readlink -f $BASE_DIR/../../..)
|
ROOT_DIR=$(readlink -f $BASE_DIR/../../..)
|
||||||
rootdir=$ROOT_DIR
|
rootdir=$ROOT_DIR
|
||||||
PLUGIN_DIR_NVME=$ROOT_DIR/examples/nvme/fio_plugin
|
PLUGIN_DIR=$ROOT_DIR/build/fio
|
||||||
PLUGIN_DIR_BDEV=$ROOT_DIR/examples/bdev/fio_plugin
|
|
||||||
BDEVPERF_DIR=$ROOT_DIR/test/bdev/bdevperf
|
BDEVPERF_DIR=$ROOT_DIR/test/bdev/bdevperf
|
||||||
NVMEPERF_DIR=$ROOT_DIR/examples/nvme/perf
|
NVMEPERF_DIR=$ROOT_DIR/examples/nvme/perf
|
||||||
. $ROOT_DIR/scripts/common.sh || exit 1
|
. $ROOT_DIR/scripts/common.sh || exit 1
|
||||||
@ -350,9 +349,9 @@ function run_spdk_nvme_fio() {
|
|||||||
local plugin=$1
|
local plugin=$1
|
||||||
echo "** Running fio test, this can take a while, depending on the run-time and ramp-time setting."
|
echo "** Running fio test, this can take a while, depending on the run-time and ramp-time setting."
|
||||||
if [[ "$plugin" = "spdk-plugin-nvme" ]]; then
|
if [[ "$plugin" = "spdk-plugin-nvme" ]]; then
|
||||||
LD_PRELOAD=$PLUGIN_DIR_NVME/fio_plugin $FIO_BIN $BASE_DIR/config.fio --output-format=json "${@:2}" --ioengine=spdk
|
LD_PRELOAD=$PLUGIN_DIR/spdk_nvme $FIO_BIN $BASE_DIR/config.fio --output-format=json "${@:2}" --ioengine=spdk
|
||||||
elif [[ "$plugin" = "spdk-plugin-bdev" ]]; then
|
elif [[ "$plugin" = "spdk-plugin-bdev" ]]; then
|
||||||
LD_PRELOAD=$PLUGIN_DIR_BDEV/fio_plugin $FIO_BIN $BASE_DIR/config.fio --output-format=json "${@:2}" --ioengine=spdk_bdev --spdk_json_conf=$BASE_DIR/bdev.conf --spdk_mem=4096
|
LD_PRELOAD=$PLUGIN_DIR/spdk_bdev $FIO_BIN $BASE_DIR/config.fio --output-format=json "${@:2}" --ioengine=spdk_bdev --spdk_json_conf=$BASE_DIR/bdev.conf --spdk_mem=4096
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
|
@ -212,7 +212,7 @@ if [[ $run_precondition == true ]]; then
|
|||||||
fio_filename=$(printf ":%sn1" "${nvmes[@]}")
|
fio_filename=$(printf ":%sn1" "${nvmes[@]}")
|
||||||
fio_filename=${fio_filename:1}
|
fio_filename=${fio_filename:1}
|
||||||
$precond_fio_bin --name="precondition" \
|
$precond_fio_bin --name="precondition" \
|
||||||
--ioengine="${rootdir}/examples/bdev/fio_plugin/fio_plugin" \
|
--ioengine="${rootdir}/build/fio/spdk_bdev" \
|
||||||
--rw="write" --spdk_json_conf="$json_cfg" --thread="1" \
|
--rw="write" --spdk_json_conf="$json_cfg" --thread="1" \
|
||||||
--group_reporting --direct="1" --size="100%" --loops="2" --bs="256k" \
|
--group_reporting --direct="1" --size="100%" --loops="2" --bs="256k" \
|
||||||
--iodepth=32 --filename="${fio_filename}" || true
|
--iodepth=32 --filename="${fio_filename}" || true
|
||||||
|
@ -21,7 +21,6 @@ function vmd_perf() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function vmd_fio() {
|
function vmd_fio() {
|
||||||
PLUGIN_DIR=$rootdir/examples/nvme/fio_plugin
|
|
||||||
for bdf in $pci_devs; do
|
for bdf in $pci_devs; do
|
||||||
fio_nvme $testdir/config/config.fio --filename="trtype=PCIe traddr=${bdf//:/.} ns=1"
|
fio_nvme $testdir/config/config.fio --filename="trtype=PCIe traddr=${bdf//:/.} ns=1"
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user