[PATCH 1/6] common/fio: add helpers using io-uring cmd engine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This will allow us to add tests which use the io-uring cmd engine,
part of fio. They are inspired by the work by Anuj Gupta and
Ankit Kumar which added sample fio files onto fio for this exact
purpose.

We can build on those to expand test coverage with elaborate tests.

We don't specify the cmd to allow other types of io-uring cmd
users to use this other than nvme.

Signed-off-by: Luis Chamberlain <mcgrof@xxxxxxxxxx>
---
 common/fio | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/common/fio b/common/fio
index bed76d555b2a..4da90804ed21 100644
--- a/common/fio
+++ b/common/fio
@@ -184,6 +184,53 @@ _run_fio_verify_io() {
 	rm -f local*verify*state
 }
 
+_run_fio_rand_iouring_cmd() {
+	_run_fio --bs=4k --rw=randread --numjobs="$(nproc)" \
+		--ioengine=io_uring_cmd --iodepth=32 \
+		--thread=1 --stonewall=1 \
+		--name=reads "$@"
+}
+
+_run_fio_verify_iouring_cmd_randwrite() {
+	_run_fio --bs=4k --rw=randwrite --numjobs="$(nproc)" \
+		--ioengine=io_uring_cmd --iodepth=32 \
+		--thread=1 --stonewall=1 \
+		--sqthread_poll=1 --sqthread_poll_cpu=0 \
+		--nonvectored=1 --registerfiles=1 \
+		--verify=crc32c \
+		--name=verify "$@"
+	rm -f local*verify*state
+}
+
+_run_fio_verify_iouring_cmd_write_opts() {
+	_run_fio --bs=4k --rw=write --numjobs="$(nproc)" \
+		--ioengine=io_uring_cmd --iodepth=32 \
+		--thread=1 --stonewall=1 \
+		--sqthread_poll=1 --sqthread_poll_cpu=0 \
+		--nonvectored=1 --registerfiles=1 \
+		--verify=crc32c \
+		--name=verify "$@"
+	rm -f local*verify*state
+}
+
+_run_fio_iouring_cmd_zone() {
+	_run_fio --rw=randread --numjobs="$(nproc)" \
+		--ioengine=io_uring_cmd --iodepth=1 \
+		--stonewall=1 \
+		--zonemode=zbd \
+		--name=reads "$@"
+}
+
+_run_fio_verify_iouring_cmd_write_opts_zone() {
+	_run_fio --rw=randread --numjobs="$(nproc)" \
+		--ioengine=io_uring_cmd --iodepth=1 \
+		--stonewall=1 \
+		--zonemode=zbd \
+		--sqthread_poll=1 --registerfiles=1 --sqthread_poll_cpu=0 \
+		--verify=crc32c \
+		--name=verify "$@"
+}
+
 _fio_perf_report() {
 	# If there is more than one group, we don't know what to report.
 	if [[ $(wc -l < "$TMPDIR/fio_perf") -gt 1 ]]; then
-- 
2.35.1




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux