Commit 4d3e9954 authored by Michal Berger's avatar Michal Berger Committed by Konrad Sztyber
Browse files

test/nvme/xnvme: Add different io patterns



Minimal set of what's currently supported depending on the
io_mechanism.

Change-Id: I18c235f6828ee5e7e99174501da8cefe6413539d
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/25307


Reviewed-by: default avatarKarl Bonde Torp <k.torp@samsung.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: default avatarJim Harris <jim.harris@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Community CI Samsung <spdk.community.ci.samsung@gmail.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent d5455995
Loading
Loading
Loading
Loading
+31 −22
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ xnvme_bdevperf() {
	init_null_blk gb=1

	local xnvme0=null0 xnvme0_dev xnvme_io=()
	local io
	local io io_pattern

	xnvme_io+=(libaio)
	xnvme_io+=(io_uring)
@@ -70,14 +70,17 @@ xnvme_bdevperf() {

	for io in "${xnvme_io[@]}"; do
		method_bdev_xnvme_create_0["io_mechanism"]="$io"
		local -n io_pattern_ref=$io
		for io_pattern in "${io_pattern_ref[@]}"; do
			"$rootdir/build/examples/bdevperf" \
				--json <(gen_conf) \
				-q 64 \
			-w randread \
				-w "$io_pattern" \
				-t 5 \
				-T "$xnvme0" \
				-o 4096
		done
	done

	remove_null_blk
}
@@ -87,7 +90,7 @@ xnvme_fio_plugin() {
	init_null_blk gb=1

	local xnvme0=null0 xnvme0_dev xnvme_io=()
	local io
	local io io_pattern

	xnvme_io+=(libaio)
	xnvme_io+=(io_uring)
@@ -101,6 +104,8 @@ xnvme_fio_plugin() {

	for io in "${xnvme_io[@]}"; do
		method_bdev_xnvme_create_0["io_mechanism"]="$io"
		local -n io_pattern_ref=$io
		for io_pattern in "${io_pattern_ref[@]}"; do
			fio_bdev \
				--ioengine=spdk_bdev \
				--spdk_json_conf=<(gen_conf) \
@@ -109,12 +114,13 @@ xnvme_fio_plugin() {
				--bs=4k \
				--iodepth=64 \
				--numjobs=1 \
			--rw=randread \
				--rw="$io_pattern" \
				--time_based \
				--runtime=5 \
				--thread=1 \
				--name "xnvme_bdev"
		done
	done
}

xnvme_rpc() {
@@ -165,6 +171,9 @@ rpc_xnvme() {

trap 'killprocess "$spdk_tgt"' EXIT

# Prep global refs for io_pattern supported per io_mechanism
libaio=(randread randwrite) io_uring=(randread randwrite)

run_test "xnvme_rpc" xnvme_rpc
run_test "xnvme_to_malloc_dd_copy" malloc_to_xnvme_copy
run_test "xnvme_bdevperf" xnvme_bdevperf