fio.git
6 years agoHOWTO: minor fixes and backports from man page
Tomohiro Kusumi [Mon, 14 Aug 2017 15:30:26 +0000 (18:30 +0300)]
HOWTO: minor fixes and backports from man page

These are minor fixes not worth separating into different commits,
which are partly backports from the previous 3 commits, and partly
its own minor fixes.

 * Use proper argument name (option -> command).
 * Use proper quotation (``).
 * Add missing :option:`` directives.
 * Add missing :file:`` directive (stat.h).
 * Add indentation.
 * Add missing alias (mem_align=).
 * Add missing period.
 * Add $ for fio command line examples
 * Cleanup ordering of some ioengine specific options.
 * Change inconsistent quotations for "1..N" and "N" to always use ``.
 * Avoid mixing of whitespace and tab indentation within the same section/block.
 * Correct fio commands' name (fio-genzipf, fio_generate_plots)
 * Correct typos ("used,where", "See disable_slat" in disable_slat)
 * Change "IO" to "I/O" which has been corrected in the past commits as well,
   except for "IO" in the output of fio itself.
 * Mention verification trigger (using magic sysrq) is Linux specific.
 * Mention "Disk stats" output (using sysfs) is Linux specific.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman: minor fixes for sections before "JOB PARAMETERS" for consistency
Tomohiro Kusumi [Mon, 14 Aug 2017 15:30:25 +0000 (18:30 +0300)]
man: minor fixes for sections before "JOB PARAMETERS" for consistency

This is the continuation of below series of patches as well as the
previous 2 commits to sync the man page with HOWTO.

[PATCH 0/7] Sync fio(1) man page with HOWTO
http://www.spinics.net/lists/fio/msg06008.html

This commit consists of minor fixes to sync formats in the earlier
sections (made by above series of pathches) with the previous 2 commits.
The contents remain the same.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman: sync "OUTPUT" section and after with HOWTO
Tomohiro Kusumi [Mon, 14 Aug 2017 15:30:24 +0000 (18:30 +0300)]
man: sync "OUTPUT" section and after with HOWTO

This is the continuation of below series of patches as well as the
previous commit to sync the man page with HOWTO. This commit covers the
rest of the sections.

[PATCH 0/7] Sync fio(1) man page with HOWTO
http://www.spinics.net/lists/fio/msg06008.html

This commit syncs the man page with HOWTO. It does not create new contents
that didn't exist in HOWTO, however formats (indentations, directives,
quotations, etc) are modified for some sections so that the entire man
page has consistent style.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman: sync "JOB PARAMETERS" section with HOWTO
Tomohiro Kusumi [Mon, 14 Aug 2017 15:30:23 +0000 (18:30 +0300)]
man: sync "JOB PARAMETERS" section with HOWTO

This is the continuation of below series of patches to sync the man page
with HOWTO. This commit covers the entire job parameters section.

[PATCH 0/7] Sync fio(1) man page with HOWTO
http://www.spinics.net/lists/fio/msg06008.html

This commit syncs the man page with HOWTO. It does not create new contents
that didn't exist in HOWTO, however formats (indentations, directives,
quotations, etc) are modified for some sections so that the entire man
page has consistent style.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO: update and clarify description of latencies in normal output
Vincent Fu [Mon, 14 Aug 2017 18:59:43 +0000 (14:59 -0400)]
HOWTO: update and clarify description of latencies in normal output

1) Add a description for the lat (min, max, avg, stddev) line
2) Use the old 'IO latencies' description for the lat (nsec/usec/msec) section
3) Fix the description of the 'IO latency' section

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agostat: change indentation of the lat (nsec/usec/msec) section in the normal output
Vincent Fu [Mon, 14 Aug 2017 18:59:42 +0000 (14:59 -0400)]
stat: change indentation of the lat (nsec/usec/msec) section in the normal output

With mixed IO the normal output looks like:

$ ./fio --name=test --ioengine=null --time_based --runtime=5s --size=1G --rw=randrw

test: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=null, iodepth=1
fio-2.21-14-ge22fd-dirty
Starting 1 process
Jobs: 1 (f=1): [m(1)][100.0%][r=5749MiB/s,w=5748MiB/s][r=1472k,w=1472k IOPS][eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=16555: Tue Jun 20 16:08:00 2017
   read: IOPS=1488k, BW=5814MiB/s (6096MB/s)(28.4GiB/5001msec)
...
  write: IOPS=1488k, BW=5812MiB/s (6094MB/s)(28.4GiB/5001msec)
...
    lat (nsec) : 20=15.47%, 50=83.90%, 100=0.49%, 250=0.11%, 500=0.02%
    lat (nsec) : 750=0.01%, 1000=0.01%
    lat (usec) : 2=0.01%, 4=0.01%, 10=0.01%, 20=0.01%, 50=0.01%
    lat (usec) : 100=0.01%, 250=0.01%, 500=0.01%
  cpu          : usr=99.84%, sys=0.00%, ctx=181, majf=0, minf=7
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwt: total=7443094,7440426,0, short=0,0,0, dropped=0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1
...

The 'lat (nsec) : 20=15.47%...' section is indented inside the 'write' block,
giving the impression that these describe only write latencies when they are
actually latencies for all of the IOs in the job.

With this patch the normal output looks like:

$ ./fio --name=test --ioengine=null --time_based --runtime=5s --size=1G --rw=randrw

test: (g=0): rw=randrw, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=null, iodepth=1
fio-2.21-14-g4ed22a-dirty
Starting 1 process
Jobs: 1 (f=1): [m(1)][100.0%][r=5879MiB/s,w=5880MiB/s][r=1505k,w=1505k IOPS][eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=16686: Tue Jun 20 16:12:43 2017
   read: IOPS=1523k, BW=5950MiB/s (6239MB/s)(29.1GiB/5001msec)
    clat (nsec): min=15, max=114599, avg=25.38, stdev=139.48
     lat (nsec): min=47, max=257952, avg=58.18, stdev=269.48
    clat percentiles (nsec):
     |  1.00th=[   18],  5.00th=[   19], 10.00th=[   20], 20.00th=[   21],
     | 30.00th=[   22], 40.00th=[   23], 50.00th=[   23], 60.00th=[   24],
     | 70.00th=[   26], 80.00th=[   27], 90.00th=[   27], 95.00th=[   28],
     | 99.00th=[   42], 99.50th=[   45], 99.90th=[  101], 99.95th=[  165],
     | 99.99th=[ 6368]
   bw (  MiB/s): min= 5722, max= 6081, per=0.10%, avg=5950.14, stdev=126.61
  write: IOPS=1523k, BW=5948MiB/s (6236MB/s)(29.0GiB/5001msec)
    clat (nsec): min=15, max=127752, avg=25.56, stdev=158.32
     lat (nsec): min=63, max=230121, avg=79.84, stdev=317.00
    clat percentiles (nsec):
     |  1.00th=[   18],  5.00th=[   19], 10.00th=[   20], 20.00th=[   21],
     | 30.00th=[   22], 40.00th=[   23], 50.00th=[   23], 60.00th=[   25],
     | 70.00th=[   26], 80.00th=[   27], 90.00th=[   27], 95.00th=[   28],
     | 99.00th=[   42], 99.50th=[   46], 99.90th=[  105], 99.95th=[  175],
     | 99.99th=[ 6624]
   bw (  MiB/s): min= 5727, max= 6079, per=0.10%, avg=5947.07, stdev=125.05
  lat (nsec)   : 20=9.40%, 50=90.27%, 100=0.22%, 250=0.08%, 500=0.01%
  lat (nsec)   : 750=0.01%, 1000=0.01%
  lat (usec)   : 2=0.01%, 4=0.01%, 10=0.01%, 20=0.01%, 50=0.01%
  lat (usec)   : 100=0.01%, 250=0.01%
  cpu          : usr=99.84%, sys=0.00%, ctx=150, majf=0, minf=7
  IO depths    : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
     submit    : 0=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     complete  : 0=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
     issued rwt: total=7617184,7614394,0, short=0,0,0, dropped=0,0,0
     latency   : target=0, window=0, percentile=100.00%, depth=1

Run status group 0 (all jobs):
   READ: bw=5950MiB/s (6239MB/s), 5950MiB/s-5950MiB/s (6239MB/s-6239MB/s), io=29.1GiB (31.2GB), run=5001-5001msec
  WRITE: bw=5948MiB/s (6236MB/s), 5948MiB/s-5948MiB/s (6236MB/s-6236MB/s), io=29.0GiB (31.2GB), run=5001-5001msec

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge branch 'ci' of https://github.com/sitsofe/fio
Jens Axboe [Mon, 14 Aug 2017 14:32:56 +0000 (08:32 -0600)]
Merge branch 'ci' of https://github.com/sitsofe/fio

6 years agobackend: cleanup overlap submission logic
Jens Axboe [Mon, 14 Aug 2017 14:28:54 +0000 (08:28 -0600)]
backend: cleanup overlap submission logic

Move it into a helper, since we're calling it from two places.
Only check if depth is > 1, since the current io_u is already
accounted as one.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge branch 'serialize_overlap' of https://github.com/sitsofe/fio
Jens Axboe [Mon, 14 Aug 2017 14:24:12 +0000 (08:24 -0600)]
Merge branch 'serialize_overlap' of https://github.com/sitsofe/fio

6 years agoiolog: tidy up log_io_piece() conditional
Sitsofe Wheeler [Wed, 10 May 2017 05:33:31 +0000 (06:33 +0100)]
iolog: tidy up log_io_piece() conditional

Code inspection shows there are currently guards in the call sites of
log_io_piece() that prevent log_io_piece() being called when
td->o.verify == VERIFY_NONE so skip checking it within log_io_piece().

Tested-by: Jeff Furlong <jeff.furlong@wdc.com>
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoiolog: remove random layout verification optimisation
Sitsofe Wheeler [Thu, 27 Apr 2017 06:22:26 +0000 (07:22 +0100)]
iolog: remove random layout verification optimisation

Running the following fio jobs unexpectedly reports a verification
failure:
rm /tmp/tmp.fio; ./fio --iodepth=1 \
 --verify=pattern --verify_fatal=1 --size=100M --bsrange=512-128k \
 --rw=randwrite --verify_backlog=128 --filename=/tmp/tmp.fio \
 --verify_pattern="%o" --name=spuriousmismatch1

rm /tmp/tmp.fio; ./fio --iodepth=1 \
 --verify=crc32c --verify_fatal=1 --size=100M --bs=4k \
 --rw=randwrite --verify_backlog=20 --filename=/tmp/tmp.fio \
 --percentage_random=50 --randseed=86 --name=spuriousmismatch2

In the case of the first job, using a bsrange where the start and end
are different can cause random write I/O to overlap an already written
region making the original data unverifiable.

For the second job, when percentage_random is between 1 and 99 the same
offset can be generated multiple times but only the last write to that
offset should be verified.

Rather than special casing the growing number of random jobs that might
generate overlaps while still having a randommap, and given preallocation
during layout is the default where possible, just remove the overwrite=0
optimisation thus forcing all random jobs to be checked for overlaps. It
is still possible to force the old behaviour by setting verifysort=0.

Fixes https://github.com/axboe/fio/issues/335 and
https://github.com/axboe/fio/issues/344 .

Tested-by: Jeff Furlong <jeff.furlong@wdc.com>
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoiolog: fix double free when verified I/O overlaps
Sitsofe Wheeler [Thu, 27 Apr 2017 06:29:56 +0000 (07:29 +0100)]
iolog: fix double free when verified I/O overlaps

When running
valgrind ./fio --randseed=1 --ioengine=libaio --thread --rw=randrw \
 --random_distribution=zipf:1.4 --filename=/tmp/fiofile --io_limit=50M \
 --verify=crc32c --name=verifyfree --iodepth=32 --bsrange=512-1M --size=100M

valgrind reports:
==29301== Invalid read of size 4
==29301==    at 0x44ADFC: io_completed (io_u.c:1835)
==29301==    by 0x44B215: ios_completed (io_u.c:1924)
==29301==    by 0x44B683: io_u_queued_complete (io_u.c:1983)
==29301==    by 0x46FA6F: wait_for_completions (backend.c:455)
==29301==    by 0x471568: do_io (backend.c:1046)
==29301==    by 0x474405: thread_main (backend.c:1746)
==29301==    by 0x576E6B9: start_thread (pthread_create.c:333)
==29301==    by 0x5C8E82C: clone (clone.S:109)
==29301==  Address 0x62cf988 is 72 bytes inside a block of size 88 free'd
==29301==    at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)

When the __ipo is still in-flight we shouldn't free it when it overlaps
because it will be used at I/O completion time. Fixes
https://github.com/axboe/fio/issues/336 .

Tested-by: Jeff Furlong <jeff.furlong@wdc.com>
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agofio: add serialize_overlap option
Sitsofe Wheeler [Sun, 23 Apr 2017 21:54:54 +0000 (22:54 +0100)]
fio: add serialize_overlap option

If this isn't set (the default) fio can submit write I/Os that overlap
other in-flight I/Os leading to potential data races. For example the
following job frequently fails at the verification stage:

./fio --random_distribution=zipf:1.6 --direct=1 --filename \
 /tmp/fiofile --ioengine=posixaio --iodepth=32 --size=20M --bs=4k \
 --rw=randwrite --verify=crc32c --name=verifyoverlap

When serialize_overlap=1 fio avoids creating such races.

Thanks to Rachel Lunnon (StorMagic) for helping me debug the initial
version of this!

Fixes: https://github.com/axboe/fio/issues/335

v2: Fix merge conflict and add missing conversion.
v3: Add man page, fix serialize_overlap disabling, improve commit
    message.

Tested-by: Jeff Furlong <jeff.furlong@wdc.com>
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoci: make CI builds fail on compilation warnings
Sitsofe Wheeler [Sun, 13 Aug 2017 08:03:46 +0000 (09:03 +0100)]
ci: make CI builds fail on compilation warnings

Fio currently builds without warnings using its default options on at
least the platforms where CI is run (Linux, macOS, Windows).
Unfortunately it's easy to overlook changes that start generating
warnings on a platform you don't use regularly. Make this problem more
visible by changing appveyor/travis CI builds to fail when compilation
warnings are produced (but don't make this change for normal manual
builds).

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoMakefile: modify make test to use a filesystem file
Sitsofe Wheeler [Sun, 13 Aug 2017 07:47:40 +0000 (08:47 +0100)]
Makefile: modify make test to use a filesystem file

Change the second job done by "make test" to a use a real file on the
filesystem where fio is built to help highlight problems (like the one
introduced by commit 2c3e17be).

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: fix unit type suffix in "Parameter types" section to upper case
Tomohiro Kusumi [Wed, 9 Aug 2017 13:44:34 +0000 (16:44 +0300)]
HOWTO: fix unit type suffix in "Parameter types" section to upper case

Redo 9ff84231('HOWTO: fix unit type suffix in "Parameter types" section').

> These should be all in lower case or all in upper case, but not both.
> The man page already has these in lower case.

Change above to all upper case based on below comment, instead of all
in lower. Fix the man page (which originally had in lower) as well.

RE: [PATCH 2/4] HOWTO: fix unit type suffix in "Parameter types" section
http://www.spinics.net/lists/fio/msg06146.html
Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoAdd ability to keep memory-mapped files
Stephen Bates [Tue, 8 Aug 2017 20:26:56 +0000 (14:26 -0600)]
Add ability to keep memory-mapped files

By default file backed memory mappings are unlink()'ed after use. This
patch keeps the files if they already existed. We don't check for
errors on access() since we will catch them on the open().

Discovered this when doing p2pmem testing and fio kept deleting the
/dev/p2pmem0 files...

Changes since v1
  Altered based on feedback from Jens to avoid using an option and
  test for file existance instead.

Signed-off-by: Stephen Bates <sbates@raithlin.com>
Changed by me to use a td->flags flag, instead of adding a new
member to thread options.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge branch 'fio-jsonplus-patches' of https://github.com/vincentkfu/fio
Jens Axboe [Mon, 7 Aug 2017 19:44:01 +0000 (13:44 -0600)]
Merge branch 'fio-jsonplus-patches' of https://github.com/vincentkfu/fio

6 years agoman: add section describing json+ output format
Vincent Fu [Mon, 7 Aug 2017 19:05:32 +0000 (15:05 -0400)]
man: add section describing json+ output format

6 years agoHOWTO: add section providing details about json+ output format
Vincent Fu [Thu, 27 Jul 2017 17:57:11 +0000 (13:57 -0400)]
HOWTO: add section providing details about json+ output format

6 years agotools: add fio_jsonplus_clat2csv
Vincent Fu [Wed, 28 Jun 2017 15:47:28 +0000 (11:47 -0400)]
tools: add fio_jsonplus_clat2csv

tools/fio_jsonplus_clat2csv converts JSON+ completion latency data to CSV
format

e6200d822f0d2b9da5600ad2429be0e9e140e125 eliminated an earlier script that
carried out a similar conversion for the original JSON+ format. I assumed
that the new JSON+ format would have no use for a similar script, but I was
wrong.

6 years agomove skip_bad= option to engines/mtd.c
Tomohiro Kusumi [Mon, 7 Aug 2017 17:37:54 +0000 (20:37 +0300)]
move skip_bad= option to engines/mtd.c

This is ioengine specific, thus should be defined in engines/mtd.c.

This option is useless unless engines/mtd.c is enabled.
It could be conditionally compiled using CONFIG_MTD, but all
other ioengines define their own option structure in their code.

The only functional difference is that now .category is changed
to FIO_OPT_C_ENGINE. This is also something done by all other
ioengine specific options, though ->category isn't really used
for anything meaningfull.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO: use proper (or drop wrong usage of) option type =bool
Tomohiro Kusumi [Mon, 7 Aug 2017 17:37:53 +0000 (20:37 +0300)]
HOWTO: use proper (or drop wrong usage of) option type =bool

There are options whose .type field are FIO_OPT_BOOL, but not using
=bool for arg type. Likewise there are options whose .type field
are not FIO_OPT_BOOL, but using =bool for arg type.

The options without explicit arg types in HOWTO seem to be for
FIO_OPT_STR_SET, which is not the same as FIO_OPT_BOOL.

The man page also has these, but not the same as the ones in HOWTO.
Also fix a typo "(mtd)skipbad=bool" in the man page which should be
"(mtd)skip_bad=bool".

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO: fix unit type suffix in "Parameter types" section
Tomohiro Kusumi [Mon, 7 Aug 2017 17:37:52 +0000 (20:37 +0300)]
HOWTO: fix unit type suffix in "Parameter types" section

These should be all in lower case or all in upper case, but not both.
Given the examples of these are mostly in lower case, this commit
uses lower.

The man page already has these in lower case.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman: add proper indentation to "PARAMETER TYPES" section
Tomohiro Kusumi [Mon, 7 Aug 2017 17:37:51 +0000 (20:37 +0300)]
man: add proper indentation to "PARAMETER TYPES" section

This commit fixes "int" subsection of "PARAMETER TYPES" section
which had no indentation, while other sections normally do have
proper indentation.

The corresponding section in HOWTO also has indentation.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO: minor fix and backport from man page
Tomohiro Kusumi [Tue, 1 Aug 2017 19:49:28 +0000 (22:49 +0300)]
HOWTO: minor fix and backport from man page

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO: fix wrong "here follows the complete list of fio job parameters" position
Tomohiro Kusumi [Tue, 1 Aug 2017 19:49:27 +0000 (22:49 +0300)]
HOWTO: fix wrong "here follows the complete list of fio job parameters" position

f80dba8d('Convert documentation to reStructured text.')
made this sentence appear in the wrong place.
It should appear before "Units" job parameter section.

The man page has this right as it's not synced (will be soon).

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO: fix wrong description of trim_backlog=
Tomohiro Kusumi [Tue, 1 Aug 2017 19:49:26 +0000 (22:49 +0300)]
HOWTO: fix wrong description of trim_backlog=

f80dba8d('Convert documentation to reStructured text.')
mixed this up with trim_verify_zero= located before this one.

The man page has this right as it's not synced (will be soon).

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge branch 'master' of https://github.com/dublio/fio
Jens Axboe [Mon, 31 Jul 2017 14:15:17 +0000 (08:15 -0600)]
Merge branch 'master' of https://github.com/dublio/fio

6 years agofilesetup: keep OS_O_DIRECT flag when pre-allocating file
weiping zhang [Sat, 29 Jul 2017 08:47:59 +0000 (16:47 +0800)]
filesetup: keep OS_O_DIRECT flag when pre-allocating file

When direct=1 the file open for pre-allocation should also set OS_O_DIRECT so
we fail earlier if the filesystem/file doesn't support direct operations.

Signed-off-by: weiping zhang <zhangweiping@didichuxing.com>
6 years agodon't print native_fallocate() error if ENOSYS
Tomohiro Kusumi [Thu, 27 Jul 2017 20:38:37 +0000 (23:38 +0300)]
don't print native_fallocate() error if ENOSYS

log_err(ENOSYS) on native_fallocate() failure which was newly added
by 2c3e17be('filesetup: add native fallocate') should be silenced
or somehow be printed only once instead of being a per file message.

This happens on a platform like FreeBSD where posix_fallocate(3)
exists, but native_fallocate() is ENOSYS.

This commit just silences it if errno is set to ENOSYS on return.
"native" is the default mode, thus not printing ENOSYS won't be any
confusing unless fallocate=native is explicitly specified, and
native_fallocate() has dprint() for ENOSYS case anyway.

--
 # uname
 FreeBSD
 # ./fio --name=xxx --ioengine=sync --rw=read --bs=4k --size=10m --nrfiles=20
 xxx: (g=0): rw=read, bs=(R) 4096B-4096B, (W) 4096B-4096B, (T) 4096B-4096B, ioengine=sync, iodepth=1
 fio-2.99-23-gdad0
 Starting 1 process
 xxx: Laying out IO files (20 files / total 10MiB)
 fio: native_fallocate call failed: Function not implemented
 fio: native_fallocate call failed: Function not implemented
 fio: native_fallocate call failed: Function not implemented
 fio: native_fallocate call failed: Function not implemented
 fio: native_fallocate call failed: Function not implemented
 fio: native_fallocate call failed: Function not implemented
 fio: native_fallocate call failed: Function not implemented
 fio: native_fallocate call failed: Function not implemented
 fio: native_fallocate call failed: Function not implemented
 fio: native_fallocate call failed: Function not implemented
 ...

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agopvsync2: Add hipri_percentage option
Stephen Bates [Thu, 27 Jul 2017 20:02:15 +0000 (14:02 -0600)]
pvsync2: Add hipri_percentage option

Allow the user to set the probability of a pvsync2 IO being high
priority. Add a new option for the pvsync2 engine called
--hipri_percentage will takes values in the range (0, 100) and use
that as a probability for setting RWF_HIPRI. The default for this
option is 100 so exisiting users of --hirpi are unaffected.

Changes since v3:
  Remove unwanted #ifdefs

Changes since v2:
  s/_probability/_percentage/

Changes since v1:
  Use --hipri_probability rather than impacting --hipri
  Correct the random number generator call

Signed-off-by: Stephen Bates <sbates@raithlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge branch 'minor_fixes' of https://github.com/sitsofe/fio
Jens Axboe [Thu, 27 Jul 2017 14:11:40 +0000 (08:11 -0600)]
Merge branch 'minor_fixes' of https://github.com/sitsofe/fio

6 years agofio: refactor fallocate defines
Sitsofe Wheeler [Thu, 27 Jul 2017 05:06:10 +0000 (06:06 +0100)]
fio: refactor fallocate defines

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoinit: force fallocate_mode to none when fallocate is unsupported
Sitsofe Wheeler [Thu, 27 Jul 2017 04:50:41 +0000 (05:50 +0100)]
init: force fallocate_mode to none when fallocate is unsupported

Commit 2c3e17be ("filesetup: add native fallocate") broke fio on Windows
because fallocate_mode wound up being set to 0 on platforms without any
type of fallocate. Work around this by forcing fallocate_mode to
FIO_FALLOCATE_NONE on such platforms.

This should address the issue mention in the mail
http://www.spinics.net/lists/fio/msg06085.html ("The commit 'filesetup:
add native fallocate' breaks on Cygwin").

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agodoc: minor grammar fixes
Sitsofe Wheeler [Thu, 20 Jul 2017 06:10:52 +0000 (07:10 +0100)]
doc: minor grammar fixes

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agodoc: add block size to log file format
Sitsofe Wheeler [Tue, 18 Jul 2017 06:46:52 +0000 (07:46 +0100)]
doc: add block size to log file format

Commit a3ae5b057588f555a1544ec749167a44c5a071aa ("Update documentation
on log file formats") added documentation for the log format but left
out the block size column so let's add it here.

While we're here clean up some formatting in log_offset, add a reference
to Log File Formats and mention that it defaults to off.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agotime: Add chosen clocksource debug
Sitsofe Wheeler [Sun, 9 Jul 2017 19:54:38 +0000 (20:54 +0100)]
time: Add chosen clocksource debug

Make it a bit easier to see which clocksource was used by printing its
enumeration value when --debug=time is used.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoexamples: add a butterfly seek job file
Sitsofe Wheeler [Sun, 9 Jul 2017 16:10:42 +0000 (17:10 +0100)]
examples: add a butterfly seek job file

Add a job file that approximates doing
read at start
read at end
read at start+1
read at end-1
[...]
read at end-1
read at start+1
read at end
read at start

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoarch: raise an error when compiling for an unknown ARM platform
Sitsofe Wheeler [Sun, 9 Jul 2017 07:32:47 +0000 (08:32 +0100)]
arch: raise an error when compiling for an unknown ARM platform

The nop, read_barrier() and write_barrier() macros have to always be
defined but due to the way os/arch-arm.h is written it is possible for
them to be undefined when the ARM platform is not recognized.

Change things so compiling for an unknown ARM platform raises an
explicit compilation error at the point of the problem.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoos: add missing include for bswap_* on BSDs
Sitsofe Wheeler [Sun, 9 Jul 2017 07:09:35 +0000 (08:09 +0100)]
os: add missing include for bswap_* on BSDs

Commit 0dcebdf4a70ef0d8144b8fcba763ae87e7fc74b5 ("configure: add endian
check") removed the sys/endian.h include from the os/*.h BSD headers but
this include is needed to access the bswap_* macros. The lack of this
include wouldn't show up unless you were compiling for a big-endian BSD
platform.

This commit adds the include back for {Free,Net,Open}BSD and adds it for
the first time to the DragonFlyBSD header.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agotravis: get rid of non-breaking space characters
Sitsofe Wheeler [Sun, 9 Jul 2017 06:48:16 +0000 (07:48 +0100)]
travis: get rid of non-breaking space characters

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: remove unnecessary escaping
Sitsofe Wheeler [Sun, 9 Jul 2017 06:28:56 +0000 (07:28 +0100)]
HOWTO: remove unnecessary escaping

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agodrop logging when blkdev invalidation failed on unsupported platforms
Tomohiro Kusumi [Tue, 25 Jul 2017 19:05:44 +0000 (22:05 +0300)]
drop logging when blkdev invalidation failed on unsupported platforms

22de5d77('Use ENOTSUP if OS doesn't support blkdev page cache invalidation')
changed errno values being used on supported platforms to ENOTSUP,
and also log_info'd it via strerror(), but strerror() isn't working
on some platform and instead prints irrelevant string.

Re: fio Windows Invalidate
http://www.spinics.net/lists/fio/msg06084.html

The logging of ENOTSUP could just be dropped since this isn't a real
failure, as many platforms either don't have the idea of invalidating
blkdev's page cache mapping, or use chrdev for block devices.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO: add missing [netsplice] for ioengine specific options
Tomohiro Kusumi [Tue, 25 Jul 2017 19:05:43 +0000 (22:05 +0300)]
HOWTO: add missing [netsplice] for ioengine specific options

These seem to be supported whether a socket is read/written by
send/recv or splice.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman: fix broken ioengine specific option format
Tomohiro Kusumi [Tue, 25 Jul 2017 19:05:42 +0000 (22:05 +0300)]
man: fix broken ioengine specific option format

The parentheses here are supposed to be for the name of ioengines,
but not for the name of options, according to other correct ones.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO: fix "should be to to"
Tomohiro Kusumi [Tue, 25 Jul 2017 19:05:41 +0000 (22:05 +0300)]
HOWTO: fix "should be to to"

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoCorrectly detect whether ioengine_load can exit early
Ben Walker [Wed, 19 Jul 2017 19:27:57 +0000 (12:27 -0700)]
Correctly detect whether ioengine_load can exit early

Just the presence of io_ops isn't enough - the requested
ioengine may have changed.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
6 years agobuild: Sort file list
Bernhard M. Wiedemann [Sun, 16 Jul 2017 19:46:31 +0000 (21:46 +0200)]
build: Sort file list

to make build reproducible.
Because filesystems/readdir returns entries in underministic order
and the linker orders functions depending on input order
the resulting fio binary differed across builds
(which we do in disposable VMs for openSUSE)

See https://reproducible-builds.org/ for why this matters.

Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman: add missing \ for fcntl(2) in write_hint option
Tomohiro Kusumi [Sun, 16 Jul 2017 12:40:20 +0000 (15:40 +0300)]
man: add missing \ for fcntl(2) in write_hint option

8f4b9f24 ('Update documentation for write_hint') was missing \.
Without this '|' becomes visible.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman: fix wrong info on sync_file_range=
Tomohiro Kusumi [Fri, 14 Jul 2017 07:24:03 +0000 (10:24 +0300)]
man: fix wrong info on sync_file_range=

This part isn't in sync with HOWTO, but also simply wrong.
HOWTO as well as the actual option have SYNC_FILE_RANGE_WAIT_AFTER for this.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoUpdate documentation for write_hint
Jens Axboe [Thu, 13 Jul 2017 15:39:01 +0000 (09:39 -0600)]
Update documentation for write_hint

We no longer have fadvise_stream, adapt the documentation to
describe the stable 'write_hint' option.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoparse: enable options to be marked dont-free
Jens Axboe [Wed, 12 Jul 2017 22:44:07 +0000 (16:44 -0600)]
parse: enable options to be marked dont-free

For profiles, we can't free the options prematurely.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoprofiles/act: use the right options
Jens Axboe [Wed, 12 Jul 2017 22:32:24 +0000 (16:32 -0600)]
profiles/act: use the right options

We have a double set - one we actually set, and then one we
check. Oops, fix that up.

Fixes: 7b504eddc4b0 ("parse: get rid of raw option offsets")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoreturn correct error code for unhandled addr.
Pan Liu [Mon, 10 Jul 2017 16:28:45 +0000 (00:28 +0800)]
return correct error code for unhandled addr.

Signed-off-by: Pan Liu <wanjun.lp@alibaba-inc.com>
6 years agoFio 2.99 fio-2.99
Jens Axboe [Fri, 7 Jul 2017 18:45:04 +0000 (12:45 -0600)]
Fio 2.99

Test release before we wrap it up and make a 3.0.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoinit: add comment as to how we seed read/write/trim generators
Jens Axboe [Fri, 7 Jul 2017 14:37:49 +0000 (08:37 -0600)]
init: add comment as to how we seed read/write/trim generators

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoio_u: sequence random buflen generation individually
Jens Axboe [Fri, 7 Jul 2017 14:33:57 +0000 (08:33 -0600)]
io_u: sequence random buflen generation individually

For trimwrite, we rely on write+trim generating identical
buffer lengths, if they have identical settings. If we use
bssplit, then we generate them using a random generator
according to the percentages set. This means we may not get
the same offsets in sequence.

Split the seeding into separate random generators, and ensure
that we seed the write and trim ones identically, if we are
doing trim writes.

Fixes: https://github.com/axboe/fio/issues/399
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agooslib/libmtd: kill dead code
Jens Axboe [Thu, 6 Jul 2017 14:09:22 +0000 (08:09 -0600)]
oslib/libmtd: kill dead code

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO: fix indentation for options and job parameters
Tomohiro Kusumi [Tue, 4 Jul 2017 18:08:16 +0000 (21:08 +0300)]
HOWTO: fix indentation for options and job parameters

HOWTO mostly uses tab indentations for command line options and job
file parameters, so replace white spaces with tabs.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO: minor backports from the man page
Tomohiro Kusumi [Tue, 4 Jul 2017 18:08:15 +0000 (21:08 +0300)]
HOWTO: minor backports from the man page

This commit mainly backports some minor fixups from the man page
sections covered in the several previous commits.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman: refer to REPORTING-BUGS for bug reporting
Tomohiro Kusumi [Tue, 4 Jul 2017 18:08:14 +0000 (21:08 +0300)]
man: refer to REPORTING-BUGS for bug reporting

REPORTING-BUGS should be mentioned here rather than README, provided
REPORTING-BUGS also mentions to see README for the mailing list
in addition to details of bug reporting.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman: sync "PARAMETER TYPES" section with HOWTO
Tomohiro Kusumi [Tue, 4 Jul 2017 18:08:13 +0000 (21:08 +0300)]
man: sync "PARAMETER TYPES" section with HOWTO

This commit brings in updates from HOWTO to man page. As a result it
replaces some entire paragraphs with the corresponding ones in HOWTO,
though not much difference for the replaced part as it only had small
modification basically saying the same thing.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman: sync "JOB FILE PARAMETERS" section with HOWTO
Tomohiro Kusumi [Tue, 4 Jul 2017 18:08:12 +0000 (21:08 +0300)]
man: sync "JOB FILE PARAMETERS" section with HOWTO

This commit replaces the entire section with the corresponding section
in HOWTO, since the man page is only slightly different from HOWTO
regarding this section.

It also renames the following section names to sync with HOWTO.
  "JOB PARAMETERS" to "JOB FILE PARAMETERS"
  "JOB PARAMETERS"'s sub section "Types" to non-sub section "PARAMETER TYPES"
  "JOB PARAMETERS"'s sub section "Parameter List" to non-sub section "JOB DESCRIPTION"

Since section names aren't following the typical man page convention
(man-pages(7) in Linux) to begin with, changing the section names
to conform to HOWTO does no harm unless there's a reason to keep names
that were once made.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman: sync "JOB FILE FORMAT" section with HOWTO
Tomohiro Kusumi [Tue, 4 Jul 2017 18:08:11 +0000 (21:08 +0300)]
man: sync "JOB FILE FORMAT" section with HOWTO

This commit brings in updates from HOWTO to man page. As a result it
replaces some entire paragraphs with the corresponding ones in HOWTO,
though not much difference for the replaced part as it only had small
modification basically saying the same thing.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman: sync OPTIONS section with HOWTO
Tomohiro Kusumi [Tue, 4 Jul 2017 18:08:10 +0000 (21:08 +0300)]
man: sync OPTIONS section with HOWTO

This commit brings in updates from HOWTO. The exception is --debug
option, which is too verbose yet not that important for all debug types
to be listed in details.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge branch 'fallocate_native' of https://github.com/sitsofe/fio
Jens Axboe [Mon, 3 Jul 2017 22:51:31 +0000 (16:51 -0600)]
Merge branch 'fallocate_native' of https://github.com/sitsofe/fio

6 years agoHOWTO: indent v3 terse output definition
Sitsofe Wheeler [Mon, 3 Jul 2017 21:16:13 +0000 (22:16 +0100)]
HOWTO: indent v3 terse output definition

Without indentation Sphinx complains:
../HOWTO:3336: WARNING: Literal block expected; none found.
../HOWTO:3336: WARNING: Literal block expected; none found.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agofilesetup: add native fallocate
Sitsofe Wheeler [Fri, 30 Jun 2017 06:32:19 +0000 (07:32 +0100)]
filesetup: add native fallocate

- Implement a native fallocate mode that only logs an error (if it's
  implemented) and falls back to the same behaviour as fallocate=none if
  it fails
- Add a native OSX and Linux fallocate
- Update man page and HOWTO with new native and defaults

v4:
- Update commit message
- Update man page and HOWTO

Fixes https://github.com/axboe/fio/issues/22 - we now print a message if
fallocate fails which gives the user a hint that behaviour might differ
from other case along with a workaround suggestion (fallocate=none).

Fixes https://github.com/axboe/fio/issues/376 - we now have
fallocate=none fallback behaviour if native fallocate fails. On at least
glibc platforms, posix_fallocate emulates fallocate if the
platform/filesystem doesn't support it (see
https://www.gnu.org/software/libc/manual/html_node/Storage-Allocation.html#index-posix_005ffallocate
for some of the caveats) resulting in strange layout performance thus
making it less attractive than fallocate=none behaviour for fio.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agogettime: reduce test CPU clock entries to 1000
Jens Axboe [Sun, 2 Jul 2017 22:21:47 +0000 (16:21 -0600)]
gettime: reduce test CPU clock entries to 1000

We don't need 10,000 and it's just wasting time.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agofilesetup: abstract out fallocate helper
Jens Axboe [Sun, 2 Jul 2017 22:15:32 +0000 (16:15 -0600)]
filesetup: abstract out fallocate helper

This is in preparation for improving how we handle fallocate.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agofio: make gauss a duplicate of normal for file_service_type
Sitsofe Wheeler [Wed, 28 Jun 2017 21:53:06 +0000 (22:53 +0100)]
fio: make gauss a duplicate of normal for file_service_type

To be consistent with random_distribution add a normal parameter to
file_service_type and state that gauss is an alias of it.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agodoc: fix random_distribution Gaussian parameter name
Sitsofe Wheeler [Wed, 28 Jun 2017 21:30:24 +0000 (22:30 +0100)]
doc: fix random_distribution Gaussian parameter name

random_distribution's parameter for a Gaussian distribution is called
"normal". Note this differs to file_service_type where the Gaussian
distribution really is selected with the "gauss" parameter.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agostat: further group percentage fixes
Sitsofe Wheeler [Tue, 27 Jun 2017 06:21:32 +0000 (07:21 +0100)]
stat: further group percentage fixes

db84b73bd7b0c3b718596fbeb6a5f940b05a6735 forgot to fix the group
percentage calculation when using json or terse output. It also did its
caculation after the mean's base might have been changed to bits but the
aggregate bandwidth's unit is (k)bytes. Fix these.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoadd FD_PARSE debug print for size= option (which exists in offset=)
Tomohiro Kusumi [Wed, 28 Jun 2017 14:21:06 +0000 (17:21 +0300)]
add FD_PARSE debug print for size= option (which exists in offset=)

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO/manpage: update percentage explanation using '%'
Tomohiro Kusumi [Wed, 28 Jun 2017 14:21:05 +0000 (17:21 +0300)]
HOWTO/manpage: update percentage explanation using '%'

82dbb8cb (HOWTO: add offset unit info for offset= option) added
how to specify offset= option in percentage format based on below post,
which was technically correct, but str_to_decimal() invoked via
option parser can convert '%' format to low-level representation.

This commit replaces 82dbb8cb using '%' syntax since this is
considered better for documentation. Note that size= option which
also supports percentage uses '%' in documentation.

in what units is offset option?
http://www.spinics.net/lists/fio/msg05969.html

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoblktrace: remove unused ioctl definitions
Jens Axboe [Wed, 28 Jun 2017 01:59:49 +0000 (19:59 -0600)]
blktrace: remove unused ioctl definitions

They can conflict with <linux/fs.h> definitions, if we have them.
Fio doesn't use them at all, so just kill them.

Fixes: https://github.com/axboe/fio/issues/391
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agomtd: add private rpmatch()
Jens Axboe [Wed, 28 Jun 2017 00:01:17 +0000 (18:01 -0600)]
mtd: add private rpmatch()

No point in doing elaborate checks for uclibc versions, when
we can just include this (very) small function ourselves.
Apparently this is also problematic on Android.

Fixes: https://github.com/axboe/fio/issues/390
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoUpdate API for file write hints
Jens Axboe [Tue, 27 Jun 2017 19:06:57 +0000 (13:06 -0600)]
Update API for file write hints

This is now queued up for 4.13 inclusion. Adjust the bits we need
to conform to what is queued up.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman page: add offset unit info for offset= option
Tomohiro Kusumi [Tue, 27 Jun 2017 15:20:07 +0000 (18:20 +0300)]
man page: add offset unit info for offset= option

Apply below commit to fio(1) man page.
82dbb8cb (HOWTO: add offset unit info for offset= option)

Certain sections/options of the man page are not in sync with HOWTO,
but this one was identical, thus the changes are the same as above.

--
On 06/27/2017 08:56 AM, Elliott, Robert (Persistent Memory) wrote:
>>  HOWTO | 8 +++++---
>>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> The manpage (fio.1) should be updated as well - that's more visible to users.
Agree, I usually catch that.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO: add offset unit info for offset= option
Tomohiro Kusumi [Tue, 27 Jun 2017 10:21:03 +0000 (13:21 +0300)]
HOWTO: add offset unit info for offset= option

Add "in bytes" and "A percentage can be specified by ...",
based on an email post titled "in what units is offset option?".

-- example of offset in percentage
 # ./fio --debug=parse --name=xxxxx --ioengine=sync --rw=rw --size=1m --unlink=1 --offset=-51 | grep "SET start_offset_percent"
 parse    12859 SET start_offset_percent 50

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agolib/ffz: remove dead store
Daniel Verkamp [Tue, 27 Jun 2017 13:24:32 +0000 (07:24 -0600)]
lib/ffz: remove dead store

word' is written in the last 'if' block but never read again.

This is harmless, but scan-build (clang-analyzer) flags it as a warning.

Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoHOWTO: fix the v3 terse output definition
Ido Ben-Tsion [Tue, 27 Jun 2017 13:22:15 +0000 (07:22 -0600)]
HOWTO: fix the v3 terse output definition

There's a typo on the HOWTO file, read_clat_min and read_clat_max are
swapped.  and so are their write counterparts. Also - pu_minf instead of
cpu_minf.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agostat: fix group percentage
Sitsofe Wheeler [Mon, 26 Jun 2017 23:04:40 +0000 (00:04 +0100)]
stat: fix group percentage

When af7f87cb59fb3fc29a7d9f56f03f7b42680a45f2 converted group stats to
bytes it broke the group percentage calculation because the mean is in
kilobytes but the aggregate bandwidth is in kilobytes. Fix this by
converting aggregate bandwidth to kilobytes when calculating the
thread's group percentage.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agostat: fix printf format specifier
Sitsofe Wheeler [Mon, 26 Jun 2017 23:38:59 +0000 (00:38 +0100)]
stat: fix printf format specifier

54c05828da413f6b4f9eec800a30624c453a4d90 introduced the printing of the
number of samples but on 64 bit macOS with clang the format specifier
generates warnings like:

stat.c:502:4: warning: format specifies type 'unsigned long' but the argument has type 'uint64_t'
      (aka 'unsigned long long') [-Wformat]
                        (&ts->bw_stat[ddir])->samples);
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fix this by using the PRIu64 macro.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoREADME: update Red Hat fio package URL
Sitsofe Wheeler [Fri, 23 Jun 2017 10:13:39 +0000 (11:13 +0100)]
README: update Red Hat fio package URL

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: note that crc32c will automatically use hw
Sitsofe Wheeler [Sun, 25 Jun 2017 22:09:07 +0000 (23:09 +0100)]
HOWTO: note that crc32c will automatically use hw

- Add note that crc32c checksumming will automatically use hardware
  acceleration if possible.
- Add note that crc32c-intel is just a synonym for crc32c.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoinit: update --crctest help syntax
Sitsofe Wheeler [Fri, 23 Jun 2017 05:40:54 +0000 (06:40 +0100)]
init: update --crctest help syntax

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO/examples: fix writetrim "typo"
Sitsofe Wheeler [Fri, 23 Jun 2017 06:31:03 +0000 (07:31 +0100)]
HOWTO/examples: fix writetrim "typo"

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: modernize output examples and descriptions
Sitsofe Wheeler [Fri, 23 Jun 2017 06:01:50 +0000 (07:01 +0100)]
HOWTO: modernize output examples and descriptions

- Update output examples to reflect what is produced by the current fio
- Add hidden comments saying how to generate output for fio examples.
- Update output descriptions to match examples.
- Add missing thread lifecycle states.

6 years agoHOWTO: Reword Log File Formats and add reference
Sitsofe Wheeler [Fri, 23 Jun 2017 23:17:03 +0000 (00:17 +0100)]
HOWTO: Reword Log File Formats and add reference

- Add reference to Log File Formats in log_avg_msec
- Reword Log File Formats for improved clarity.
- In Log File Formats note that IOPS will always be 1 when using the
  default of individual I/O logging.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: reword iodepth and submit distribution text
Sitsofe Wheeler [Wed, 21 Jun 2017 06:29:54 +0000 (07:29 +0100)]
HOWTO: reword iodepth and submit distribution text

Reword the explanation text so phrasing of iodepth and submit
distributions is more similar. Also draw attention to the fact the value
represents the end-point in iodepth distributions and the start-point in
submit distributions.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: reorder client/server phrasing
Sitsofe Wheeler [Fri, 23 Jun 2017 22:34:51 +0000 (23:34 +0100)]
HOWTO: reorder client/server phrasing

Reorder sentences so that backend is in the same position as server and the
frontend is in the same position as client.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: add some markup
Sitsofe Wheeler [Fri, 23 Jun 2017 22:31:52 +0000 (23:31 +0100)]
HOWTO: add some markup

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: add rate example
Sitsofe Wheeler [Fri, 23 Jun 2017 22:27:23 +0000 (23:27 +0100)]
HOWTO: add rate example

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: add --output-format=terse as another way to get minimal output
Sitsofe Wheeler [Fri, 23 Jun 2017 06:37:24 +0000 (07:37 +0100)]
HOWTO: add --output-format=terse as another way to get minimal output

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: reword HDFS description
Sitsofe Wheeler [Fri, 23 Jun 2017 06:36:42 +0000 (07:36 +0100)]
HOWTO: reword HDFS description

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: make filesize syntax show it can take a typed range
Sitsofe Wheeler [Fri, 23 Jun 2017 06:35:47 +0000 (07:35 +0100)]
HOWTO: make filesize syntax show it can take a typed range

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: Fix some capitalisation
Sitsofe Wheeler [Fri, 23 Jun 2017 06:35:14 +0000 (07:35 +0100)]
HOWTO: Fix some capitalisation

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: description rewording/fixes
Sitsofe Wheeler [Fri, 23 Jun 2017 06:27:31 +0000 (07:27 +0100)]
HOWTO: description rewording/fixes

Reword descriptions to make them easier to understand, fix
typos/grammar, fix formatting and reduce duplication.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>