nvme uring-passthrough test
A message that is not in the archive (sent off-list or not yet received): CGME20230331035611epcas5p32847bd838cd6a8d9abbdd41e6c2df282@epcas5p3.samsung.com
v2 cover nvme uring-passthrough test
Patch 1: contains a little helper for fio version check Patch 2: contains few tests for uring-passthrough on NVMe device
Changes since v1:
- Remove dead/commented lines in patch 2
Kanchan Joshi (2):
common,fio: helper for version check
nvme/047: add test for uring-passthrough
common/fio | 14 ++++++++++++++ tests/nvme/047 | 43 +++++++++++++++++++++++++++++++++++++++++++ tests/nvme/047.out | 2 ++ 3 files changed, 59 insertions(+) create mode 100755 tests/nvme/047 create mode 100644 tests/nvme/047.out
Signature · 1 line
2.25.1
PATCH v2 1/2 common,fio: helper for version check
Add new helper _have_fio_ver which checks whether installed fio version is greater than or equal to input.
--- common/fio | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
common/fio +14 -0
@@ -25,6 +25,20 @@ _have_fio_zbd_zonemode() { fi return 0 } +# Check whether the version of the fio is greater than or equal to $1.$2.$3 +_have_fio_ver() { + local d=$1 e=$2 f=$3 + + _have_fio || return $? + + IFS='.' read -r a b c < <(fio --version | cut -c 5- | sed 's/-.*//') + if [ $((a * 65536 + b * 256 + c)) -lt $((d * 65536 + e * 256 + f)) ]; + then + SKIP_REASONS+=("fio version too old") + return 1 + fi + return 0 +} declare -A FIO_TERSE_FIELDS FIO_TERSE_FIELDS=(
Signature · 1 line
2.25.1
PATCH v2 2/2 nvme/047: add test for uring-passthrough
In reply to Kanchan JoshiUser can communicate to NVMe char device (/dev/ngXnY) using the uring-passthrough interface. This test exercises some of these communication pathways, using the 'io_uring_cmd' ioengine of fio.
--- tests/nvme/047 | 43 +++++++++++++++++++++++++++++++++++++++++++ tests/nvme/047.out | 2 ++ 2 files changed, 45 insertions(+) create mode 100755 tests/nvme/047 create mode 100644 tests/nvme/047.out
tests/nvme/047 new file +43 -0
@@ -0,0 +1,43 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-3.0+ +# Copyright (C) 2023 Kanchan Joshi, Samsung Electronics +# Test exercising uring passthrough IO on nvme char device + +. tests/nvme/rc + +DESCRIPTION="basic test for uring-passthrough I/O on /dev/ngX" +QUICK=1 + +requires() { + _nvme_requires + _have_kver 6 1 + _have_fio_ver 3 33 +} + +test_device() { + echo "Running ${TEST_NAME}" + local ngdev=${TEST_DEV/nvme/ng} + local common_args=( + --size=1M + --filename="$ngdev" + --bs=4k + --rw=randread + --numjobs=1 + --iodepth=16 + --name=randread + --ioengine=io_uring_cmd + --cmd_type=nvme + --time_based + --runtime=2 + ) + #plain read test + _run_fio "${common_args[@]}" + + #read with iopoll + _run_fio "${common_args[@]}" --hipri + + #read with fixedbufs + _run_fio "${common_args[@]}" --fixedbufs + + echo "Test complete" +}
tests/nvme/047.out new file +2 -0
@@ -0,0 +1,2 @@ +Running nvme/047 +Test complete
Signature · 1 line
2.25.1
Sagi Grimberg
maintainerRe: [PATCH blktests v2 2/2] nvme/047: add test for uring-passthrough
Quoted 33 lines
User can communicate to NVMe char device (
/dev/ngXnY) using the uring-passthrough interface. This test exercises some of these communication pathways, using the 'io_uring_cmd' ioengine of fio.Signed-off-by Kanchan Joshi <[email protected]>--- tests/nvme/047 | 43 +++++++++++++++++++++++++++++++++++++++++++ tests/nvme/047.out | 2 ++ 2 files changed, 45 insertions(+)create mode 100755 tests/nvme/047
create mode 100644 tests/nvme/047.outtests/nvme/047 new file +14
-0@@ -0,0 +1,43 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-3.0+ +# Copyright (C) 2023 Kanchan Joshi, Samsung Electronics +# Test exercising uring passthrough IO on nvme char device + +. tests/nvme/rc + +DESCRIPTION="basic test for uring-passthrough I/O on /dev/ngX" +QUICK=1 + +requires() { + _nvme_requires + _have_kver 6 1 + _have_fio_ver 3 33
tests/nvme/047 line 24
Quoted 10 lines
tests/nvme/047 new file +10
-0+} + +test_device() { + echo "Running ${TEST_NAME}" + local ngdev=${TEST_DEV/nvme/ng} + local common_args=( + --size=1M + --filename="$ngdev" + --bs=4k + --rw=randread
Maybe while you're at it expand a bit to:
--rw=randrw
--bsrange=512-128k,512-128k
Quoted 27 lines
tests/nvme/047 new file +19
-0+ --numjobs=1 + --iodepth=16 + --name=randread + --ioengine=io_uring_cmd + --cmd_type=nvme + --time_based + --runtime=2 + ) + #plain read test + _run_fio "${common_args[@]}" + + #read with iopoll + _run_fio "${common_args[@]}" --hipri + + #read with fixedbufs + _run_fio "${common_args[@]}" --fixedbufs + + echo "Test complete" +}tests/nvme/047.out new file +2
-0@@ -0,0 +1,2 @@ +Running nvme/047 +Test complete