fio.git
4 years agozipf/pareto/gauss: add option to disable hashing
Jens Axboe [Tue, 17 May 2016 00:09:43 +0000 (18:09 -0600)]
zipf/pareto/gauss: add option to disable hashing

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agostat: add blocksize to averaged log, if it's consistent
Jens Axboe [Mon, 16 May 2016 16:53:44 +0000 (10:53 -0600)]
stat: add blocksize to averaged log, if it's consistent

If we average over time, fio doesn't add the blocksize used. The
reasoning behind that is that if we're using multiple block sizes,
there's no right answer. But if we are not, we can add the blocksize
that was used.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoverify: unroll string copy
Jens Axboe [Wed, 11 May 2016 01:50:00 +0000 (19:50 -0600)]
verify: unroll string copy

Let's just turn the strcpy+replace into a hand rolled version.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoverify: only escape 'name', not prefix+name
Jens Axboe [Wed, 11 May 2016 01:43:08 +0000 (19:43 -0600)]
verify: only escape 'name', not prefix+name

Fixes: e139c0c076e5 ("verify: escape '/' in state file name to '.'")
Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoverify: escape '/' in state file name to '.'
Jens Axboe [Wed, 11 May 2016 00:50:48 +0000 (18:50 -0600)]
verify: escape '/' in state file name to '.'

If the job name includes a front slash, then we get an error when
we try to create the state file name:

fio: open state file: No such file or directory

Change the '/' to '.' instead, so we generate a valid file name.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoverify: increase state file name and log error on failure
Jens Axboe [Wed, 11 May 2016 00:23:37 +0000 (18:23 -0600)]
verify: increase state file name and log error on failure

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoioengines: cleanup
Jens Axboe [Tue, 10 May 2016 18:15:26 +0000 (12:15 -0600)]
ioengines: cleanup

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoengines/pmemblk: more cleanups
Jens Axboe [Tue, 10 May 2016 15:26:08 +0000 (09:26 -0600)]
engines/pmemblk: more cleanups

No (intended) functional changes in this patch.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoChange default IO engine from sync to psync
Jens Axboe [Mon, 9 May 2016 19:35:09 +0000 (13:35 -0600)]
Change default IO engine from sync to psync

If the OS doesn't give us a default IO engine, then fio defaults to
sync. We should use psync instead, since we have that everywhere.
For fast storage, it avoids and lseek(), which can be a big deal.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoio_u: if we're doing backwards IO, wrap to end (not start)
Jens Axboe [Mon, 9 May 2016 19:31:01 +0000 (13:31 -0600)]
io_u: if we're doing backwards IO, wrap to end (not start)

If we have a job with a start file offset and we're doing holed
IO, we want to wrap to the start offset for forwards holes, but
to the end for backwards holes.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agofilesetup: ensure that we align file starting offset
Jens Axboe [Mon, 9 May 2016 14:42:40 +0000 (08:42 -0600)]
filesetup: ensure that we align file starting offset

If --offset=xx is given, and xx isn't a multiple of the block size,
then align it if we're doing O_DIRECT IO.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoMakefile: fix path to tools/fiologparser.py
Jens Axboe [Fri, 6 May 2016 23:10:33 +0000 (17:10 -0600)]
Makefile: fix path to tools/fiologparser.py

Fixes: 642483dbae99 ("Fix typo in tools/fiologparser.py")
Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoFix typo in tools/fiologparser.py
Jens Axboe [Fri, 6 May 2016 21:40:55 +0000 (15:40 -0600)]
Fix typo in tools/fiologparser.py

Also change interpreter to /usr/bin/python, that's where it is on
most distros (not /bin/python).

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agodiskutil: adapt to new helper_thread functions
Jens Axboe [Fri, 6 May 2016 20:38:19 +0000 (14:38 -0600)]
diskutil: adapt to new helper_thread functions

We don't have helper_exit anymore. This caused the link to fail on
platforms where we don't have diskutil support.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoos/os-mac: kill unused code
Jens Axboe [Fri, 6 May 2016 20:32:03 +0000 (14:32 -0600)]
os/os-mac: kill unused code

We don't use the old timer functions anymore, kill the OSX
emulation of them.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agohelper_thread: split into separate file
Jens Axboe [Fri, 6 May 2016 20:17:14 +0000 (14:17 -0600)]
helper_thread: split into separate file

It's nicely contained now, split it into its own set of files.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoMerge branch 'logging'
Jens Axboe [Fri, 6 May 2016 20:04:21 +0000 (14:04 -0600)]
Merge branch 'logging'

4 years agoWire up pmemblk
Jens Axboe [Fri, 6 May 2016 20:01:26 +0000 (14:01 -0600)]
Wire up pmemblk

Add it to our options, and to the documentation.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoengines/pmemblk: get rid of CACHE_LOCK/UNLOCK defines
Jens Axboe [Fri, 6 May 2016 19:56:27 +0000 (13:56 -0600)]
engines/pmemblk: get rid of CACHE_LOCK/UNLOCK defines

Much clearer to just call the pthread mutex lock/unlock directly,
since you don't have to looku what this macro does.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoengines/pmeblk: fixup coding style
Jens Axboe [Fri, 6 May 2016 19:53:46 +0000 (13:53 -0600)]
engines/pmeblk: fixup coding style

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoMerge branch 'libpmemblk' of https://github.com/bgbhpe/fio
Jens Axboe [Fri, 6 May 2016 19:51:53 +0000 (13:51 -0600)]
Merge branch 'libpmemblk' of https://github.com/bgbhpe/fio

4 years agoMakefile: add tools/fiologpaser.py
Jens Axboe [Fri, 6 May 2016 17:43:57 +0000 (11:43 -0600)]
Makefile: add tools/fiologpaser.py

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoadded fio log parser tool.
Mark Nelson [Fri, 6 May 2016 17:39:07 +0000 (12:39 -0500)]
added fio log parser tool.

Signed-off-by: Mark Nelson <mnelson@redhat.com>
4 years agostat: remove debug statement
Jens Axboe [Fri, 6 May 2016 17:19:55 +0000 (11:19 -0600)]
stat: remove debug statement

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoImprove logging accuracy
Jens Axboe [Fri, 6 May 2016 17:14:19 +0000 (11:14 -0600)]
Improve logging accuracy

If we do windowed logging (over a period of time), then we can
take the logging out of the IO worker fast path, and just have
our helper thread do it. This means we'll reduce the overhead
for the IO worker (which is important), and that we'll be able
to provide better accuracy of when we log. Before this change,
we'd log when we had exceeded the window of time at a completion
even. This means that if you had a logging time of 500 msec,
you'd always exceed that and even tend to skew it to being much
later. With this change, logging should be very accurate time
wise:

$ ./fio --inflate-log=fsrandW4-8-iopslog_iops.1.log.fz | head -n10
500, 470, 0, 0
1000, 492, 0, 0
1500, 484, 0, 0
2000, 492, 0, 0
2500, 454, 0, 0
3000, 462, 0, 0
3500, 480, 0, 0
4000, 462, 0, 0
4500, 472, 0, 0
5000, 496, 0, 0

and not exhibit any drift at all.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agolibfio: clear iops/bw sample times on stats reset
Jens Axboe [Thu, 5 May 2016 16:55:47 +0000 (10:55 -0600)]
libfio: clear iops/bw sample times on stats reset

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoiolog: add define for default number of log entries
Jens Axboe [Thu, 5 May 2016 16:54:03 +0000 (10:54 -0600)]
iolog: add define for default number of log entries

We use two different ones, depending on gz or not...

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoiolog: free memory on gz init failure
Jens Axboe [Thu, 5 May 2016 16:51:23 +0000 (10:51 -0600)]
iolog: free memory on gz init failure

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoiolog: don't use the workqueue for sync work
Jens Axboe [Thu, 5 May 2016 16:49:14 +0000 (10:49 -0600)]
iolog: don't use the workqueue for sync work

Just run it inline. We'll need this going forward, since we can't
always rely on the proper shared memory from the helper thread.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoiolog: fix use-after-free of iolog_flush_data
Jens Axboe [Thu, 5 May 2016 14:48:09 +0000 (08:48 -0600)]
iolog: fix use-after-free of iolog_flush_data

If we run with compressed logs, drop_data_unlock() will free 'data'
before killing the condvar and mutex.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agohash: import Linux sparse hash fix
Jens Axboe [Tue, 3 May 2016 19:56:47 +0000 (13:56 -0600)]
hash: import Linux sparse hash fix

This is commit 689de1d6ca95 in the upstream Linux kernel tree.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoUpdate RBD documentation
Jens Axboe [Mon, 2 May 2016 14:25:16 +0000 (08:25 -0600)]
Update RBD documentation

Sync them between HOWTO and fio.1 as well.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agorbd: add clustername option
Tianqing [Mon, 2 May 2016 14:21:53 +0000 (08:21 -0600)]
rbd: add clustername option

As the Ceph Jewel is released, ceph cluster name
may not be the default "ceph". So we should add
the clustername for rbd engine to support that.

Signed-off-by: Tianqing <tianqing@unitedstack.com>
Fixed up various coding style violations by me.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoFio 2.9 fio-2.9
Jens Axboe [Thu, 28 Apr 2016 22:23:10 +0000 (16:23 -0600)]
Fio 2.9

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agooslib/getopt_long: allow (unique) short match
Jens Axboe [Fri, 22 Apr 2016 22:14:24 +0000 (18:14 -0400)]
oslib/getopt_long: allow (unique) short match

The GNU version allows short matches, if they are unique. Our version
does not, since it's weird, but let's at least make them have the
same behavior. Otherwise users will have different behavior for
command line parsing for edge cases, on different platforms.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoinclude sys/sysmacros.h for major/minor
Mike Frysinger [Wed, 20 Apr 2016 16:52:19 +0000 (12:52 -0400)]
include sys/sysmacros.h for major/minor

These functions have always been defined in sys/sysmacros.h under
Linux C libraries.  For some, including sys/types.h implicitly
includes that as well, but glibc wants to deprecate that, and some
others already have.  Include the header explicitly for the funcs.

The mtd change is already in upstream mtd-utils too.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoDocumentation: it's 'log_max_value', not 'log_max'
Jens Axboe [Mon, 18 Apr 2016 20:54:12 +0000 (16:54 -0400)]
Documentation: it's 'log_max_value', not 'log_max'

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agot/fio-verify-state: show completions in order
Jens Axboe [Fri, 15 Apr 2016 15:03:34 +0000 (09:03 -0600)]
t/fio-verify-state: show completions in order

We currently show them in array order, but that's logged in
reverse. So show them from newest to latest.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agofilesetup: assign fileno at setup time
Jens Axboe [Thu, 14 Apr 2016 14:57:46 +0000 (08:57 -0600)]
filesetup: assign fileno at setup time

For duplicate jobs, we don't always get fileno assigned if we have
multiple files per job. Ensure that we do.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agot/fio-verify-state: allow multiple input files
Jens Axboe [Thu, 14 Apr 2016 14:21:18 +0000 (08:21 -0600)]
t/fio-verify-state: allow multiple input files

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoclient: bool conversion
Jens Axboe [Wed, 13 Apr 2016 21:53:06 +0000 (15:53 -0600)]
client: bool conversion

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agot/fio-verify-state: pretty up output a bit
Jens Axboe [Wed, 13 Apr 2016 21:13:55 +0000 (15:13 -0600)]
t/fio-verify-state: pretty up output a bit

Also parseable now.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoCleanup last write logging
Jens Axboe [Wed, 13 Apr 2016 18:47:24 +0000 (12:47 -0600)]
Cleanup last write logging

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoFix verify state for multiple files
Jens Axboe [Wed, 13 Apr 2016 18:25:52 +0000 (12:25 -0600)]
Fix verify state for multiple files

Fio currently only logs the completions on a per-job basis, but
that breaks down if the job uses multiple files and we rely
on the verify state save/load to check when to stop verifying.

This patch extends the verify state format to be version 3, and
removes support for v1/v2. The new version has support for
multiple files.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agopmemblk: don't use #defines for the pmemblk_* functions
Brian Boylston [Mon, 11 Apr 2016 15:24:57 +0000 (10:24 -0500)]
pmemblk: don't use #defines for the pmemblk_* functions

4 years agopmemblk: remove comments about an external engine
Brian Boylston [Mon, 11 Apr 2016 15:20:36 +0000 (10:20 -0500)]
pmemblk: remove comments about an external engine

4 years agoadd an example job file for pmemblk
Brian Boylston [Mon, 11 Apr 2016 15:17:17 +0000 (10:17 -0500)]
add an example job file for pmemblk

4 years agoModify RDMA engine to print strerror messages.
Logan Gunthorpe [Mon, 4 Apr 2016 16:06:03 +0000 (10:06 -0600)]
Modify RDMA engine to print strerror messages.

In order to ease debugging it would be nice to know why certain
rdma/ib functions fail. I've added %m messages to a large
number of log_err lines.

4 years agofio: register pvsync2 engine correctly
Jon Derrick [Wed, 30 Mar 2016 22:17:55 +0000 (16:17 -0600)]
fio: register pvsync2 engine correctly

I'm experimenting with the new syscalls and noticed fio's support was
incomplete. This patch fixes some of those issues.

Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoHOWTO/man: clarify that the usr/sys utilization numbers are averages
Jens Axboe [Tue, 29 Mar 2016 14:34:06 +0000 (08:34 -0600)]
HOWTO/man: clarify that the usr/sys utilization numbers are averages

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoFix crash with group_reporting and one group member that never started
Jens Axboe [Tue, 29 Mar 2016 14:28:56 +0000 (08:28 -0600)]
Fix crash with group_reporting and one group member that never started

If we have a job that nevers gets started, then we crash in
setting up the group stats, if group_reporting is enabled. This
can be reproduced like this:

fio --name=iwontstart --name=null --ioengine=null --size=1g --group_reporting=1
Starting 2 processes
iwontstart: you need to specify size=
fio: pid=0, err=22/file:filesetup.c:828, func=total_file_size, error=Invalid argument
Segmentation fault (core dumped)

Check for -1 groupid, and just skip the job if so.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoadd pmemblk engine
Brian Boylston [Sun, 27 Mar 2016 21:15:16 +0000 (16:15 -0500)]
add pmemblk engine

4 years agot/read-to-pipe-async: use gettimeofday() instead of clock_gettime()
Jens Axboe [Fri, 25 Mar 2016 15:40:41 +0000 (09:40 -0600)]
t/read-to-pipe-async: use gettimeofday() instead of clock_gettime()

We don't have clock_gettime() on all supported platforms, we can
just use gettimeofday() and convert to timespec.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agot/read-to-pipe-async: synchronization fixes
Jens Axboe [Fri, 25 Mar 2016 14:30:36 +0000 (08:30 -0600)]
t/read-to-pipe-async: synchronization fixes

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agot/memlock: sample utility to use X memory from Y threads
Jens Axboe [Thu, 24 Mar 2016 23:07:05 +0000 (17:07 -0600)]
t/memlock: sample utility to use X memory from Y threads

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoMakefile: disable build of t/read-to-pipe-async by default
Jens Axboe [Thu, 24 Mar 2016 21:58:21 +0000 (15:58 -0600)]
Makefile: disable build of t/read-to-pipe-async by default

It's not part of fio, if you need it, you can just do:

$ make t/read-to-pipe-async

and it should build.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agot/read-to-pipe-async: needs time.h on some platforms
Jens Axboe [Thu, 24 Mar 2016 21:56:09 +0000 (15:56 -0600)]
t/read-to-pipe-async: needs time.h on some platforms

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agot/read-to-pipe-async: standalone test app
Jens Axboe [Thu, 24 Mar 2016 21:52:19 +0000 (15:52 -0600)]
t/read-to-pipe-async: standalone test app

Reads from a file through reads, spawning more threads if necessary
to keep the latency target. Writes the result to a pipe, and outputs
the latencies at the end.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agobackend: ensure that we run verification for short time based jobs
Jens Axboe [Thu, 24 Mar 2016 19:36:22 +0000 (13:36 -0600)]
backend: ensure that we run verification for short time based jobs

We need to break out of the main loop for the case where we did
exceed our bytes issued, if we have verification to run. For
time based jobs, we'll get back in this loop after verification.

Fixes c04e4661e4da ("time_based: Avoid restarting main I/O loop")
Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agotravis.yml: ensure we have libaio-dev and numa dev libs
Jens Axboe [Thu, 24 Mar 2016 03:38:59 +0000 (21:38 -0600)]
travis.yml: ensure we have libaio-dev and numa dev libs

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoMakefile: add empty 'test' target
Jens Axboe [Thu, 24 Mar 2016 03:36:09 +0000 (21:36 -0600)]
Makefile: add empty 'test' target

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoAdd .travis.yml
Jens Axboe [Thu, 24 Mar 2016 03:31:48 +0000 (21:31 -0600)]
Add .travis.yml

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agogen-rand: fix dependency on strcasestr.o
Jens Axboe [Sun, 20 Mar 2016 15:38:57 +0000 (09:38 -0600)]
gen-rand: fix dependency on strcasestr.o

Fails on systems where we have to pull that in (eg Windows).

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoinit: seed repeatable jobs differently
Jens Axboe [Fri, 18 Mar 2016 16:07:16 +0000 (09:07 -0700)]
init: seed repeatable jobs differently

Factor in the job number for the stock random seeds, so we don't
generate the same patterns for identical jobs.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoFio 2.8 fio-2.8
Jens Axboe [Tue, 15 Mar 2016 16:10:37 +0000 (09:10 -0700)]
Fio 2.8

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoverify: clear IO verify state all_io_list before writing
Jens Axboe [Tue, 15 Mar 2016 16:09:10 +0000 (09:09 -0700)]
verify: clear IO verify state all_io_list before writing

We only fill it partially sometimes, so ensure that we clear
the whole thing before writing it out. This fixes valgrind
complaining about writing unitialized memory.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoRevert "options: move pattern_fmt_desc where we need it"
Jens Axboe [Tue, 15 Mar 2016 15:48:25 +0000 (09:48 -0600)]
Revert "options: move pattern_fmt_desc where we need it"

This reverts commit 5f3bd0fd67254e3750681f0700a0cc162faee500.

We do need it to be globally reachable, otherwise we assign a
pointer to an on-stack structure. This causes the pattern filling
to read garbage, and segfault.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agolib/rand: make __init_randX() static
Jens Axboe [Thu, 10 Mar 2016 19:12:09 +0000 (12:12 -0700)]
lib/rand: make __init_randX() static

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoUse 32-bit rand for parts that use rand_between()
Jens Axboe [Thu, 10 Mar 2016 19:09:14 +0000 (12:09 -0700)]
Use 32-bit rand for parts that use rand_between()

We don't need a full 32-bit space for these, and the 32-bit generator
is faster.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agot/gen-rand: use 32-bit random generator
Jens Axboe [Thu, 10 Mar 2016 18:08:19 +0000 (11:08 -0700)]
t/gen-rand: use 32-bit random generator

This was inadvertently changed.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoFix compile of test programs on archs that use arch_flags at runtime
Jens Axboe [Thu, 10 Mar 2016 15:09:41 +0000 (08:09 -0700)]
Fix compile of test programs on archs that use arch_flags at runtime

SuperH compile currently fails with:

gettime.o: In function fio_gettime':
/home/thomas/projets/buildroot/output/build/fio-fio-2.7/gettime.c:163: undefined reference to arch_flags'
gettime.o: In function utime_since_now':
/home/thomas/projets/buildroot/output/build/fio-fio-2.7/gettime.c:164: undefined reference to arch_flags'
gettime.o: In function mtime_since_now':
/home/thomas/projets/buildroot/output/build/fio-fio-2.7/gettime.c:164: undefined reference to arch_flags'
gettime.o: In function time_since_now':
/home/thomas/projets/buildroot/output/build/fio-fio-2.7/gettime.c:164: undefined reference to arch_flags'
mutex.o: In function fio_mutex_up':
/home/thomas/projets/buildroot/output/build/fio-fio-2.7/mutex.c:189: undefined reference to arch_flags'
collect2: error: ld returned 1 exit status
Makefile:375: recipe for target 't/stest' failed
make[2]: *** [t/stest] Error 1
make[2]: *** Waiting for unfinished jobs....

Fix that by ensuring we have a stub arch.o with the necessary arch flags
for the standalone test programs.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agot/gen-rand: remove compile warning on 32-bit
Jens Axboe [Wed, 9 Mar 2016 21:15:11 +0000 (14:15 -0700)]
t/gen-rand: remove compile warning on 32-bit

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoFio 2.7 fio-2.7
Jens Axboe [Wed, 9 Mar 2016 16:42:56 +0000 (09:42 -0700)]
Fio 2.7

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years ago.gitignore: ignore vim undo files
Jens Axboe [Tue, 8 Mar 2016 18:19:17 +0000 (11:19 -0700)]
.gitignore: ignore vim undo files

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoAdd t/gen-rand to test random generator
Jens Axboe [Tue, 8 Mar 2016 16:58:13 +0000 (09:58 -0700)]
Add t/gen-rand to test random generator

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoUpdate documentation on log file formats
Jens Axboe [Tue, 8 Mar 2016 15:56:57 +0000 (08:56 -0700)]
Update documentation on log file formats

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agorand: use bools
Jens Axboe [Mon, 7 Mar 2016 22:38:44 +0000 (15:38 -0700)]
rand: use bools

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoAdd the sample JESD219 job file
Jens Axboe [Mon, 7 Mar 2016 21:44:24 +0000 (14:44 -0700)]
Add the sample JESD219 job file

Based on the posting from Jeff.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoio_u: speed up __get_next_buflen()
Andrey Kuzmin [Mon, 7 Mar 2016 21:40:25 +0000 (14:40 -0700)]
io_u: speed up __get_next_buflen()

Change the divide-by-100 into a multiplier instead.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agooptions: improvements to parse dry run
Jens Axboe [Mon, 7 Mar 2016 19:19:21 +0000 (12:19 -0700)]
options: improvements to parse dry run

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agooptions: finish merge of bssplit/rand zone code
Jens Axboe [Mon, 7 Mar 2016 19:01:40 +0000 (12:01 -0700)]
options: finish merge of bssplit/rand zone code

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agooptions: unify the bssplit/zone split code
Jens Axboe [Mon, 7 Mar 2016 16:29:13 +0000 (09:29 -0700)]
options: unify the bssplit/zone split code

Most of that parsing code was duplicated, apply a bit of abstraction
to it. Especially because it's not that pretty, so rather have one
copy of that nastiness.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoFix double free of td zone state index
Jens Axboe [Sat, 5 Mar 2016 02:50:41 +0000 (19:50 -0700)]
Fix double free of td zone state index

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoLog to parent instead of twice to child td
Alan C [Sat, 5 Mar 2016 00:13:14 +0000 (16:13 -0800)]
Log to parent instead of twice to child td

4 years agooptions: clean number of zones if we fail parsing
Jens Axboe [Fri, 4 Mar 2016 22:34:27 +0000 (15:34 -0700)]
options: clean number of zones if we fail parsing

Leaves us in a cleaner state, since the zone generation will never
attempt to touch uninitialized data then.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoAdd support for zones of random IO, with varying frequency of access
Jens Axboe [Fri, 4 Mar 2016 22:29:32 +0000 (15:29 -0700)]
Add support for zones of random IO, with varying frequency of access

Let's say you want to ensure that 50% of the IO falls in the first 5%
of the flie, with the remaining 50% over the last 95%. Now that's
possible with random_distribution=zoned. For this particular case,
you would do:

random_distribution=zoned:50/5:50/95

Up to 64 ranges can be specified, and multiple data directions can
be given as well. The above would apply to both reads, writes, and
trims. If you wanted to have 50% of the writes fall in the first
10%, 25% in the next 10%, and the last 25% over the remaining 80%,
you could extend the above ala:

random_distribution=zoned:50/5:50/95,50/10:25/10:25/80

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoUpdate documentation for random_distribution=gauss
Jens Axboe [Thu, 3 Mar 2016 21:00:54 +0000 (14:00 -0700)]
Update documentation for random_distribution=gauss

For some reason this was never committed, add it now.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoAdd support for preadv2/pwritev2
Jens Axboe [Fri, 26 Feb 2016 19:02:54 +0000 (11:02 -0800)]
Add support for preadv2/pwritev2

This is coming on Linux, and supports a high priority flag that will
use polling on the completion side.

Basic support is there, we'll need to add wrappers on x86_64 linux
to use them before it shows up in the glibc devel headers.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoioengines: account any queued IO on the engine side
Jens Axboe [Thu, 25 Feb 2016 20:24:47 +0000 (12:24 -0800)]
ioengines: account any queued IO on the engine side

Currently we don't account if it's not a read/write/trim, but that
can screw up with SYNC, for instance. Account any IO that the
IO engine has returned a queued status for.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agobackend: ensure that fio_io_sync() commits IN on queued status
Jens Axboe [Thu, 25 Feb 2016 16:04:06 +0000 (09:04 -0700)]
backend: ensure that fio_io_sync() commits IN on queued status

If we get a FIO_Q_QUEUED back, we need to commit pending IO
before we wait for it. Otherwise we trigger this bug:

fio: ioengines.c:257: td_io_getevents: Assertion `td->io_u_in_flight >= r' failed.

Reported-by: Andrey Kuzmin <andrey.v.kuzmin@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoAllow IO engine driven allocations of IO structures
Jens Axboe [Wed, 24 Feb 2016 23:29:08 +0000 (16:29 -0700)]
Allow IO engine driven allocations of IO structures

Based on a patch from Andrey Kuzmin, but modified so that we error
out if the user has specified a specific memory backing type
through the use of mem= or iomem=.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoAllow for the include file specification to be relative.
Andrey Kuzmin [Sat, 13 Feb 2016 19:31:00 +0000 (12:31 -0700)]
Allow for the include file specification to be relative.

Simplifies include file grouping, with same directory file included
via file name. Checked only if the lookup by the file name specified
fails.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agofio.1: man page fixes
Jens Axboe [Fri, 12 Feb 2016 22:00:39 +0000 (15:00 -0700)]
fio.1: man page fixes

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoUpdate documentation
Jens Axboe [Fri, 12 Feb 2016 17:37:01 +0000 (10:37 -0700)]
Update documentation

Section numbering duplicated in one place in the HOWTO.
Add the missing sections to the man page.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoserver: don't make SO_REUSEPORT errors fatal
Jens Axboe [Wed, 10 Feb 2016 15:32:13 +0000 (08:32 -0700)]
server: don't make SO_REUSEPORT errors fatal

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agodiskutil: don't print terse disk util twice for json,terse output format
Jens Axboe [Tue, 9 Feb 2016 20:45:50 +0000 (13:45 -0700)]
diskutil: don't print terse disk util twice for json,terse output format

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agodiskutil: fix segfault for both json and terse output
Jens Axboe [Tue, 9 Feb 2016 20:19:34 +0000 (13:19 -0700)]
diskutil: fix segfault for both json and terse output

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agoio_ddir: io_ddir_name array should be static
Jens Axboe [Fri, 5 Feb 2016 15:42:26 +0000 (08:42 -0700)]
io_ddir: io_ddir_name array should be static

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agofio: fix copy/paste error in io_ddir.h
Andrey Kuzmin [Fri, 5 Feb 2016 15:14:52 +0000 (08:14 -0700)]
fio: fix copy/paste error in io_ddir.h

The last 'write' should be 'wait', to match with DDIR_WAIT.

Signed-off-by: Jens Axboe <axboe@fb.com>
4 years agolog: add support for logging max instead of averages
Jens Axboe [Thu, 4 Feb 2016 19:09:48 +0000 (12:09 -0700)]
log: add support for logging max instead of averages

If we log with lov_avg_msec, fio will log the average over that
period of time to the log. Add log_max_value to change this to
logging maximums over the windowed period instead.

Signed-off-by: Jens Axboe <axboe@fb.com>