From 9a723c1a4856333b3f6ad4f9dd84de156089eb4b Mon Sep 17 00:00:00 2001 From: Pawel Niedzwiecki Date: Thu, 14 Dec 2017 21:08:13 +0100 Subject: [PATCH] test/virtio: Add vhost initiator tests for multiqueue We define 'size' and 'offset' parameter as % of device so on nvme devices the tests are run with big files and small on malloc so we can remove the 4G test case Change-Id: I4840e859732696dd981ab0ab11e5270c025ff248 Signed-off-by: Pawel Niedzwiecki Reviewed-on: https://review.gerrithub.io/391838 Reviewed-by: Dariusz Stojaczyk Tested-by: SPDK Automated Test System Reviewed-by: Changpeng Liu Reviewed-by: Karol Latecki Reviewed-by: Jim Harris --- test/vhost/initiator/bdev.conf | 6 +++--- test/vhost/initiator/bdev.fio | 13 ++++++++----- test/vhost/initiator/bdev_nightly.fio | 17 ++++++++++------- test/vhost/initiator/blockdev.sh | 12 ++---------- 4 files changed, 23 insertions(+), 25 deletions(-) diff --git a/test/vhost/initiator/bdev.conf b/test/vhost/initiator/bdev.conf index 01fe837033..a45844585d 100644 --- a/test/vhost/initiator/bdev.conf +++ b/test/vhost/initiator/bdev.conf @@ -1,14 +1,14 @@ [VirtioUser0] Path naa.Nvme0n1.0 - Queues 4 + Queues 18 [VirtioUser1] Path naa.Malloc0.1 - Queues 4 + Queues 18 [VirtioUser2] Path naa.Malloc1.2 - Queues 4 + Queues 18 [Ioat] Disable Yes diff --git a/test/vhost/initiator/bdev.fio b/test/vhost/initiator/bdev.fio index 40bcce8ad1..86940f07a8 100644 --- a/test/vhost/initiator/bdev.fio +++ b/test/vhost/initiator/bdev.fio @@ -9,25 +9,28 @@ verify=md5 verify_backlog=1024 iodepth=128 bs=4K +runtime=10 +size=25% [job_randwrite] -stonewall rw=randwrite -name=rardwrite +name=randwrite [job_unmap_trim_sequential] -stonewall +offset=25% rw=trim trim_verify_zero=1 name=unmap_trim_sequential [job_unmap_trim_random] -stonewall +offset=50% rw=randtrim trim_verify_zero=1 name=unmap_trim_random [job_unmap_write] stonewall -rw=write +offset=25% +size=50% +rw=randwrite name=unmap_write diff --git a/test/vhost/initiator/bdev_nightly.fio b/test/vhost/initiator/bdev_nightly.fio index eb2ee9905d..6d2fcc3558 100644 --- a/test/vhost/initiator/bdev_nightly.fio +++ b/test/vhost/initiator/bdev_nightly.fio @@ -9,40 +9,43 @@ verify=md5 verify_backlog=1024 iodepth=128 bs=4K +runtime=10 +size=13% [job_randwrite] -stonewall rw=randwrite name=rardwrite [job_randrw] -stonewall +offset=13% rw=randrw name=randrw [job_write] -stonewall +offset=26% rw=write name=write [job_rw] -stonewall +offset=39% rw=rw name=rw [job_unmap_trim_sequential] -stonewall +offset=52% rw=trim trim_verify_zero=1 name=unmap_trim_sequential [job_unmap_trim_random] -stonewall +offset=65% rw=randtrim trim_verify_zero=1 name=unmap_trim_random [job_unmap_write] stonewall -rw=write +offset=52% +size=26% +rw=randwrite name=unmap_write diff --git a/test/vhost/initiator/blockdev.sh b/test/vhost/initiator/blockdev.sh index 792d693f79..9a966df972 100755 --- a/test/vhost/initiator/blockdev.sh +++ b/test/vhost/initiator/blockdev.sh @@ -53,7 +53,7 @@ fi trap 'rm -f *.state; error_exit "${FUNCNAME}""${LINENO}"' ERR SIGTERM SIGABRT function run_spdk_fio() { LD_PRELOAD=$PLUGIN_DIR/fio_plugin $FIO_BIN --ioengine=spdk_bdev\ - --runtime=10 "$@" --spdk_mem=1024 + "$@" --spdk_mem=1024 } function create_bdev_config() @@ -82,8 +82,6 @@ function create_bdev_config() vbdevs=$(discover_bdevs $ROOT_DIR $BASE_DIR/bdev.conf) virtio_bdevs=$(jq -r '[.[].name] | join(":")' <<< $vbdevs) - virtio_nvme_bdevs=$(jq -r '[.[] | - select(.driver_specific.virtio.socket=="naa.Nvme0n1.0").name] | join(":")' <<< $vbdevs) } timing_enter spdk_vhost_run @@ -95,15 +93,9 @@ create_bdev_config timing_exit create_bdev_config timing_enter run_spdk_fio -run_spdk_fio $BDEV_FIO --filename=$virtio_bdevs\ - --io_size=400m --size=100m --spdk_conf=$BASE_DIR/bdev.conf +run_spdk_fio $BDEV_FIO --filename=$virtio_bdevs --spdk_conf=$BASE_DIR/bdev.conf timing_exit run_spdk_fio -timing_enter run_spdk_fio_4G -run_spdk_fio $BDEV_FIO --filename=$virtio_nvme_bdevs\ - --io_size=4G --size=1G --offset=4G --spdk_conf=$BASE_DIR/bdev.conf -timing_exit run_spdk_fio_4G - rm -f *.state timing_enter spdk_vhost_kill spdk_vhost_kill