Recent changes (master)
The following changes since commit 12db6deb8b767ac89dd73e34dbc6f06905441e07:
Merge branch 'patch-1' of https://github.com/ferdnyc/fio (2022-05-01 07:29:05 -0600)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 6f1a24593c227a4f392f454698aca20e95f0006c:
Makefile: Suppress -Wimplicit-fallthrough when compiling lex.yy (2022-05-12 11:02:55 -0600)
----------------------------------------------------------------
Ammar Faizi (2):
backend: Fix indentation
Makefile: Suppress -Wimplicit-fallthrough when compiling lex.yy
Ankit Kumar (3):
engines/xnvme: add xnvme engine
docs: documentation for xnvme ioengine
examples: add example job file for xnvme engine usage
HOWTO.rst | 55 ++- Makefile | 13 +- backend.c | 2 +- configure | 22 + engines/xnvme.c | 981 +++++++++++++++++++++++++++++++++++++++++++++ examples/xnvme-compare.fio | 72 ++++ examples/xnvme-zoned.fio | 87 ++++ fio.1 | 70 +++- optgroup.h | 2 + options.c | 5 + 10 files changed, 1302 insertions(+), 7 deletions(-) create mode 100644 engines/xnvme.c create mode 100644 examples/xnvme-compare.fio create mode 100644 examples/xnvme-zoned.fio
---
Diff of recent changes:
HOWTO.rst +53 -2
@@ -2171,6 +2171,12 @@ I/O engine **exec** Execute 3rd party tools. Could be used to perform monitoring during jobs runtime. + **xnvme** + I/O engine using the xNVMe C API, for NVMe devices. The xnvme engine provides + flexibility to access GNU/Linux Kernel NVMe driver via libaio, IOCTLs, io_uring, + the SPDK NVMe driver, or your own custom NVMe driver. The xnvme engine includes + engine specific options. (See https://xnvme.io). + I/O engine specific parameters ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -2260,7 +2266,7 @@ with the caveat that when used on the command line, they must come after the making the submission and completion part more lightweight. Required for the below :option:`sqthread_poll` option. -.. option:: sqthread_poll : [io_uring] +.. option:: sqthread_poll : [io_uring] [xnvme] Normally fio will submit IO by issuing a system call to notify the kernel of available items in the SQ ring. If this option is set, the
@@ -2275,7 +2281,7 @@ with the caveat that when used on the command line, they must come after the .. option:: hipri - [io_uring] + [io_uring], [xnvme] If this option is set, fio will attempt to use polled IO completions. Normal IO completions generate interrupts to signal the completion of
@@ -2725,6 +2731,51 @@ with the caveat that when used on the command line, they must come after the If set, stdout and stderr streams are redirected to files named from the job name. Default is true. +.. option:: xnvme_async=str : [xnvme] + + Select the xnvme async command interface. This can take these values. + + **emu** + This is default and used to emulate asynchronous I/O. + **thrpool** + Use thread pool for Asynchronous I/O. + **io_uring** + Use Linux io_uring/liburing for Asynchronous I/O. + **libaio** + Use Linux aio for Asynchronous I/O. + **posix** + Use POSIX aio for Asynchronous I/O. + **nil** + Use nil-io; For introspective perf. evaluation + +.. option:: xnvme_sync=str : [xnvme] + + Select the xnvme synchronous command interface. This can take these values. + + **nvme** + This is default and uses Linux NVMe Driver ioctl() for synchronous I/O. + **psync** + Use pread()/write() for synchronous I/O. + +.. option:: xnvme_admin=str : [xnvme] + + Select the xnvme admin command interface. This can take these values. + + **nvme** + This is default and uses linux NVMe Driver ioctl() for admin commands. + **block** + Use Linux Block Layer ioctl() and sysfs for admin commands. + **file_as_ns** + Use file-stat to construct NVMe idfy responses. + +.. option:: xnvme_dev_nsid=int : [xnvme] + + xnvme namespace identifier, for userspace NVMe driver. + +.. option:: xnvme_iovec=int : [xnvme] + + If this option is set. xnvme will use vectored read/write commands. + I/O depth ~~~~~~~~~
Makefile +11 -2
@@ -223,7 +223,12 @@ ifdef CONFIG_LIBZBC libzbc_LIBS = -lzbc ENGINES += libzbc endif - +ifdef CONFIG_LIBXNVME + xnvme_SRCS = engines/xnvme.c + xnvme_LIBS = $(LIBXNVME_LIBS) + xnvme_CFLAGS = $(LIBXNVME_CFLAGS) + ENGINES += xnvme +endif ifeq ($(CONFIG_TARGET_OS), Linux) SOURCE += diskutil.c fifo.c blktrace.c cgroup.c trim.c engines/sg.c \ oslib/linux-dev-lookup.c engines/io_uring.c
@@ -530,8 +535,12 @@ else $(QUIET_LEX)$(LEX) $< endif +ifneq (,$(findstring -Wimplicit-fallthrough,$(CFLAGS))) +LEX_YY_CFLAGS := -Wno-implicit-fallthrough +endif + lex.yy.o: lex.yy.c y.tab.h - $(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $< + $(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) $(LEX_YY_CFLAGS) -c $< y.tab.o: y.tab.c y.tab.h $(QUIET_CC)$(CC) -o $@ $(CFLAGS) $(CPPFLAGS) -c $<
backend.c +1 -1
@@ -2021,7 +2021,7 @@ static void reap_threads(unsigned int *nr_running, uint64_t *t_rate,for_each_td (td, i) {int flags =0 ; -if (!strcmp (td->o.ioengine,"cpuio" )) +if (!strcmp (td->o.ioengine,"cpuio" )) cputhreads++;else realthreads++;
configure +22 -0
@@ -171,6 +171,7 @@ march_set="no" libiscsi="no" libnbd="no" libnfs="no" +xnvme="no" libzbc="" dfs="" dynamic_engines="no"
@@ -240,6 +241,8 @@ for opt do ;; --disable-libzbc) libzbc="no" ;; + --enable-xnvme) xnvme="yes" + ;; --disable-tcmalloc) disable_tcmalloc="yes" ;; --disable-nfs) disable_nfs="yes"
@@ -291,6 +294,7 @@ if test "$show_help" = "yes" ; then echo "--with-ime= Install path for DDN's Infinite Memory Engine" echo "--enable-libiscsi Enable iscsi support" echo "--enable-libnbd Enable libnbd (NBD engine) support" + echo "--enable-xnvme Enable xnvme support" echo "--disable-libzbc Disable libzbc even if found" echo "--disable-tcmalloc Disable tcmalloc support" echo "--dynamic-libengines Lib-based ioengines as dynamic libraries"
@@ -2583,6 +2587,19 @@ if test "$libzbc" != "no" ; then fi print_config "libzbc engine" "$libzbc" +########################################## +# Check if we have xnvme +if test "$xnvme" != "yes" ; then + if check_min_lib_version xnvme 0.2.0; then + xnvme="yes" + xnvme_cflags=$(pkg-config --cflags xnvme) + xnvme_libs=$(pkg-config --libs xnvme) + else + xnvme="no" + fi +fi +print_config "xnvme engine" "$xnvme" + ########################################## # check march=armv8-a+crc+crypto if test "$march_armv8_a_crc_crypto" != "yes" ; then
@@ -3190,6 +3207,11 @@ if test "$libnfs" = "yes" ; then echo "LIBNFS_CFLAGS=$libnfs_cflags" >> $config_host_mak echo "LIBNFS_LIBS=$libnfs_libs" >> $config_host_mak fi +if test "$xnvme" = "yes" ; then + output_sym "CONFIG_LIBXNVME" + echo "LIBXNVME_CFLAGS=$xnvme_cflags" >> $config_host_mak + echo "LIBXNVME_LIBS=$xnvme_libs" >> $config_host_mak +fi if test "$dynamic_engines" = "yes" ; then output_sym "CONFIG_DYNAMIC_ENGINES" fi
engines/xnvme.c new file +981 -0
981 lines not on this page · raw message
examples/xnvme-compare.fio new file +72 -0
72 lines not on this page · raw message
examples/xnvme-zoned.fio new file +87 -0
87 lines not on this page · raw message
fio.1 +68 -2
94 lines not on this page · raw message
optgroup.h +2 -0
@@ -72,6 +72,7 @@ enum opt_category_group { __FIO_OPT_G_DFS, __FIO_OPT_G_NFS, __FIO_OPT_G_WINDOWSAIO, + __FIO_OPT_G_XNVME,FIO_OPT_G_RATE = (1ULL << __FIO_OPT_G_RATE), FIO_OPT_G_ZONE = (1ULL << __FIO_OPT_G_ZONE),
@@ -118,6 +119,7 @@ enum opt_category_group {FIO_OPT_G_LIBCUFILE = (1ULL << __FIO_OPT_G_LIBCUFILE),FIO_OPT_G_DFS = (1ULL << __FIO_OPT_G_DFS),FIO_OPT_G_WINDOWSAIO = (1ULL << __FIO_OPT_G_WINDOWSAIO), + FIO_OPT_G_XNVME = (1ULL << __FIO_OPT_G_XNVME), };extern const struct opt_group *opt_group_from_mask (uint64_t *mask);
options.c +5 -0
@@ -2144,6 +2144,11 @@ struct fio_option fio_options[FIO_MAX_OPTS] = { { .ival = "nfs", .help = "NFS IO engine", }, +#endif +#ifdef CONFIG_LIBXNVME + { .ival = "xnvme", + .help = "XNVME IO engine", + }, #endif }, },