test/nvme-perf: group kernel mode setup into one block
Group all kernel conditionals for various ioengines in one if block. Change-Id: I14f736c1ab8fce13effeb9ec06731b3d14859941 Signed-off-by: Karol Latecki <karol.latecki@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479818 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
73059a2a53
commit
d82c680d60
@ -11,6 +11,13 @@ NVMEPERF_DIR=$ROOT_DIR/examples/nvme/perf
|
|||||||
. $ROOT_DIR/test/common/autotest_common.sh
|
. $ROOT_DIR/test/common/autotest_common.sh
|
||||||
NVME_FIO_RESULTS=$BASE_DIR/result.json
|
NVME_FIO_RESULTS=$BASE_DIR/result.json
|
||||||
|
|
||||||
|
declare -A KERNEL_ENGINES
|
||||||
|
KERNEL_ENGINES=(
|
||||||
|
["kernel-libaio"]="--ioengine=libaio"
|
||||||
|
["kernel-classic-polling"]="--ioengine=pvsync2 --hipri=100"
|
||||||
|
["kernel-hybrid-polling"]="--ioengine=pvsync2 --hipri=100"
|
||||||
|
["kernel-io-uring"]="--ioengine=io_uring" )
|
||||||
|
|
||||||
RW=randrw
|
RW=randrw
|
||||||
MIX=100
|
MIX=100
|
||||||
IODEPTH=256
|
IODEPTH=256
|
||||||
|
@ -47,27 +47,19 @@ if $PRECONDITIONING; then
|
|||||||
preconditioning
|
preconditioning
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Kernel Classic Polling ioengine parameters
|
if [[ "$PLUGIN" =~ "kernel" ]]; then
|
||||||
if [ $PLUGIN = "kernel-classic-polling" ]; then
|
|
||||||
$ROOT_DIR/scripts/setup.sh reset
|
$ROOT_DIR/scripts/setup.sh reset
|
||||||
fio_ioengine_opt="--ioengine=pvsync2 --hipri=100"
|
fio_ioengine_opt="${KERNEL_ENGINES[$PLUGIN]}"
|
||||||
|
|
||||||
|
if [[ $PLUGIN = "kernel-classic-polling" ]]; then
|
||||||
for disk in $DISK_NAMES; do
|
for disk in $DISK_NAMES; do
|
||||||
echo -1 > /sys/block/$disk/queue/io_poll_delay
|
echo -1 > /sys/block/$disk/queue/io_poll_delay
|
||||||
done
|
done
|
||||||
#Kernel Hybrid Polling ioengine parameter
|
elif [[ $PLUGIN = "kernel-hybrid-polling" ]]; then
|
||||||
elif [ $PLUGIN = "kernel-hybrid-polling" ]; then
|
|
||||||
$ROOT_DIR/scripts/setup.sh reset
|
|
||||||
fio_ioengine_opt="--ioengine=pvsync2 --hipri=100"
|
|
||||||
for disk in $DISK_NAMES; do
|
for disk in $DISK_NAMES; do
|
||||||
echo 0 > /sys/block/$disk/queue/io_poll_delay
|
echo 0 > /sys/block/$disk/queue/io_poll_delay
|
||||||
done
|
done
|
||||||
elif [ $PLUGIN = "kernel-libaio" ]; then
|
elif [[ $PLUGIN = "kernel-io-uring" ]]; then
|
||||||
$ROOT_DIR/scripts/setup.sh reset
|
|
||||||
fio_ioengine_opt="--ioengine=libaio"
|
|
||||||
elif [ $PLUGIN = "kernel-io-uring" ]; then
|
|
||||||
$ROOT_DIR/scripts/setup.sh reset
|
|
||||||
fio_ioengine_opt="--ioengine=io_uring"
|
|
||||||
|
|
||||||
modprobe -rv nvme
|
modprobe -rv nvme
|
||||||
modprobe nvme poll_queues=8
|
modprobe nvme poll_queues=8
|
||||||
wait_for_nvme_reload $DISK_NAMES
|
wait_for_nvme_reload $DISK_NAMES
|
||||||
@ -85,7 +77,6 @@ elif [ $PLUGIN = "kernel-io-uring" ]; then
|
|||||||
cat $sysfs/io_poll_delay > $backup_dir/$disk/io_poll_delay
|
cat $sysfs/io_poll_delay > $backup_dir/$disk/io_poll_delay
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
for disk in $DISK_NAMES; do
|
for disk in $DISK_NAMES; do
|
||||||
echo "INFO: Setting device parameters for $disk"
|
echo "INFO: Setting device parameters for $disk"
|
||||||
sysfs=/sys/block/$disk/queue
|
sysfs=/sys/block/$disk/queue
|
||||||
@ -95,6 +86,7 @@ elif [ $PLUGIN = "kernel-io-uring" ]; then
|
|||||||
echo 0 > $sysfs/io_poll_delay
|
echo 0 > $sysfs/io_poll_delay
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
result_dir=$BASE_DIR/results/perf_results_${BLK_SIZE}BS_${IODEPTH}QD_${RW}_${MIX}MIX_${PLUGIN}_${DATE}
|
result_dir=$BASE_DIR/results/perf_results_${BLK_SIZE}BS_${IODEPTH}QD_${RW}_${MIX}MIX_${PLUGIN}_${DATE}
|
||||||
result_file=$result_dir/perf_results_${BLK_SIZE}BS_${IODEPTH}QD_${RW}_${MIX}MIX_${PLUGIN}_${DATE}.csv
|
result_file=$result_dir/perf_results_${BLK_SIZE}BS_${IODEPTH}QD_${RW}_${MIX}MIX_${PLUGIN}_${DATE}.csv
|
||||||
|
Loading…
Reference in New Issue
Block a user