From d7aa681b6b079b69445fee1db462ebbf1d0e0f88 Mon Sep 17 00:00:00 2001 From: Pawel Piatek Date: Wed, 30 Jun 2021 05:33:40 +0200 Subject: [PATCH] test/nvme_perf: add main core parameter For Test Case 2: SPDK NVMe BDEV I/O Cores Scaling we need to specify DPDK main (primary) core. Signed-off-by: Pawel Piatek Change-Id: I53d706c4173e16035a3883c29547659a0c7a22fc Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8553 Reviewed-by: Paul Luse Reviewed-by: Karol Latecki Reviewed-by: Tomasz Zawadzki Reviewed-by: Shuhei Matsumoto Reviewed-by: Ziye Yang Tested-by: SPDK CI Jenkins --- test/nvme/perf/common.sh | 6 +++++- test/nvme/perf/run_perf.sh | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/test/nvme/perf/common.sh b/test/nvme/perf/common.sh index 97951a059..13f74f3f1 100755 --- a/test/nvme/perf/common.sh +++ b/test/nvme/perf/common.sh @@ -408,7 +408,11 @@ function run_nvme_fio() { function run_bdevperf() { echo "** Running bdevperf test, this can take a while, depending on the run-time setting." - $bdevperf_dir/bdevperf --json $testdir/bdev.conf -q $IODEPTH -o $BLK_SIZE -w $RW -M $MIX -t $RUNTIME -m "[$CPUS_ALLOWED]" -r /var/tmp/spdk.sock + local main_core_param="" + if [[ -n $MAIN_CORE ]]; then + main_core_param="-p ${MAIN_CORE}" + fi + $bdevperf_dir/bdevperf --json $testdir/bdev.conf -q $IODEPTH -o $BLK_SIZE -w $RW -M $MIX -t $RUNTIME -m "[$CPUS_ALLOWED]" -r /var/tmp/spdk.sock $main_core_param sleep 1 } diff --git a/test/nvme/perf/run_perf.sh b/test/nvme/perf/run_perf.sh index 2bb0a7614..6b2af2b76 100755 --- a/test/nvme/perf/run_perf.sh +++ b/test/nvme/perf/run_perf.sh @@ -35,6 +35,7 @@ IO_BATCH_COMPLETE=0 FIO_BIN=$CONFIG_FIO_SOURCE_DIR/fio FIO_FNAME_STRATEGY="group" TMP_RESULT_FILE=$testdir/result.json +MAIN_CORE="" PLUGIN="nvme" DISKCFG="" BDEV_CACHE="" @@ -105,6 +106,7 @@ function usage() { echo " --cpu-frequency=INT Run tests with CPUs set to a desired frequency. 'intel_pstate=disable' must be set in" echo " GRUB options. You can use 'cpupower frequency-info' and 'cpupower frequency-set' to" echo " check list of available frequencies. Example: --cpu-frequency=1100000." + echo " --main-core main (primary) core for DPDK (for bdevperf only)." echo echo "Other options:" echo " --perftop Run perftop measurements on the same CPU cores as specified in --cpu-allowed option." @@ -162,6 +164,7 @@ while getopts 'h-:' optchar; do perftop) PERFTOP=true ;; dpdk-mem-stats) DPDKMEM=true ;; latency-log) LATENCY_LOG=true ;; + main-core=*) MAIN_CORE="${OPTARG#*=}" ;; *) usage $0 echo "Invalid argument '$OPTARG'" exit 1