fio: add additional support for dev-dax ioengine
authorDave Jiang <dave.jiang@intel.com>
Fri, 16 Dec 2016 22:59:06 +0000 (15:59 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 16 Dec 2016 23:05:05 +0000 (16:05 -0700)
Fixup options.c to add the dev-dax to ioengine list. Update fio.1 and
HOWTO as well. Also adding example fio job file.

Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
HOWTO
examples/dev-dax.fio [new file with mode: 0644]
fio.1
options.c

diff --git a/HOWTO b/HOWTO
index bfc60be50572a03074344d359719e886460a42d4..6893c86878b2d9420bf263eb5e04056440cd322d 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -819,6 +819,9 @@ ioengine=str        Defines how the job issues io to the file. The following
                        pmemblk Read and write through the NVML libpmemblk
                                interface.
 
+                       dev-dax Read and write through a DAX device exposed
+                               from persistent memory.
+
                        external Prefix to specify loading an external
                                IO engine object file. Append the engine
                                filename, eg ioengine=external:/tmp/foo.o
diff --git a/examples/dev-dax.fio b/examples/dev-dax.fio
new file mode 100644 (file)
index 0000000..d9f430e
--- /dev/null
@@ -0,0 +1,45 @@
+[global]
+bs=2m
+ioengine=dev-dax
+norandommap
+time_based=1
+runtime=30
+group_reporting
+disable_lat=1
+disable_slat=1
+disable_clat=1
+clat_percentiles=0
+cpus_allowed_policy=split
+
+# For the dev-dax engine:
+#
+#   IOs always complete immediately
+#   IOs are always direct
+#
+iodepth=1
+direct=0
+thread=1
+numjobs=16
+#
+# The dev-dax engine does IO to DAX device that are special character
+# devices exported by the kernel (e.g. /dev/dax0.0). The device is
+# opened normally and then the region is accessible via mmap. We do
+# not use the O_DIRECT flag because the device is naturally direct
+# access. The O_DIRECT flags will result in failure. The engine
+# access the underlying NVDIMM directly once the mmapping is setup.
+#
+# Check the alignment requirement of your DAX device. Currently the default
+# should be 2M. Blocksize (bs) should meet alignment requirement.
+#
+# An example of creating a dev dax device node from pmem:
+# ndctl create-namespace --reconfig=namespace0.0 --mode=dax --force
+#
+filename=/dev/dax0.0
+
+[dev-dax-write]
+rw=randwrite
+stonewall
+
+[dev-dax-read]
+rw=randread
+stonewall
diff --git a/fio.1 b/fio.1
index 270798a47bc0ddaffb7c3a2c4d4497ce2f20456d..e8a327c93769e9751112325d8abfa6b13b353662 100644 (file)
--- a/fio.1
+++ b/fio.1
@@ -722,6 +722,9 @@ constraint.
 .TP
 .B pmemblk
 Read and write through the NVML libpmemblk interface.
+.TP
+.B dev-dax
+Read and write through a DAX device exposed from persistent memory.
 .RE
 .P
 .RE
index 4c4f52c001c03b89df76ee5547d391a316df2c1e..7638afc0f8ed94b87f26ea835c2e59bce44936db 100644 (file)
--- a/options.c
+++ b/options.c
@@ -1769,6 +1769,11 @@ struct fio_option fio_options[FIO_MAX_OPTS] = {
                            .help = "NVML libpmemblk based IO engine",
                          },
 
+#endif
+#ifdef CONFIG_LINUX_DEVDAX
+                         { .ival = "dev-dax",
+                           .help = "DAX Device based IO engine",
+                         },
 #endif
                          { .ival = "external",
                            .help = "Load external engine (append name)",