fio.git
6 years agofix verify_only when using ioengine=mmap
Barak Pinhas [Tue, 5 Dec 2017 12:23:22 +0000 (14:23 +0200)]
fix verify_only when using ioengine=mmap

verify_only was opening the file with O_RDONLY and the mmap
engine was trying to mmap it with PROT_READ | PROTWRITE hence
getting -EACCESS and failing the job

6 years agoMerge branch 'wip-cleanup' of https://github.com/ZVampirEM77/fio
Jens Axboe [Sun, 3 Dec 2017 17:11:53 +0000 (10:11 -0700)]
Merge branch 'wip-cleanup' of https://github.com/ZVampirEM77/fio

6 years agoconfigure: fix typos
Enming Zhang [Sun, 3 Dec 2017 09:50:10 +0000 (17:50 +0800)]
configure: fix typos

check for rbd_invaidate_cache() --> check for rbd_invalidate_cache()

Signed-off-by: Enming Zhang <enming.zhang@umcloud.com>
6 years agosteadystate: style cleanup
Jens Axboe [Sat, 2 Dec 2017 23:29:44 +0000 (16:29 -0700)]
steadystate: style cleanup

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agosteadystate: add free helper
Jens Axboe [Sat, 2 Dec 2017 16:18:46 +0000 (09:18 -0700)]
steadystate: add free helper

Also fix a style issue.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agothread_options: drop fadvise_stream from thread_options
Vincent Fu [Fri, 1 Dec 2017 21:52:08 +0000 (16:52 -0500)]
thread_options: drop fadvise_stream from thread_options

ae8e559e got rid of the fadvise_stream option but did
not remove the corresponding member from thread_options

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agomemcpy: add hybrid
Jens Axboe [Fri, 1 Dec 2017 21:49:42 +0000 (14:49 -0700)]
memcpy: add hybrid

Use builtin memcpy for < 64 bytes, use simple variant for larger
ones. libc doesn't seem to like to use SSE, the hand rolled simple
variant uses that for larger copies.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agomemcpy: free buffer in case of failure
Jens Axboe [Fri, 1 Dec 2017 20:56:09 +0000 (13:56 -0700)]
memcpy: free buffer in case of failure

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agomemcpy: use malloc
Jens Axboe [Fri, 1 Dec 2017 18:30:49 +0000 (11:30 -0700)]
memcpy: use malloc

We don't have posix_memalign() everywhere, let's just use malloc.

Also free memory when done.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agofio_time: should include time.h
Jens Axboe [Fri, 1 Dec 2017 18:21:58 +0000 (11:21 -0700)]
fio_time: should include time.h

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoAdd basic memcpy test
Jens Axboe [Fri, 1 Dec 2017 18:13:23 +0000 (11:13 -0700)]
Add basic memcpy test

Research is ongoing in how to improve (and make deterministic) the
memcpy speed, since it's especially applicable to the persistent
memory engines.

Not documented yet.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoio_u: don't account io issue blocks for verify backlog
Jens Axboe [Fri, 1 Dec 2017 04:48:12 +0000 (21:48 -0700)]
io_u: don't account io issue blocks for verify backlog

We don't account the bytes, we should not account the blocks
either.

Fixes: ae2fafc8 ("verify: verify bytes should not add to this_io_bytes")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agooptions: warn if we exceed the supported number of split entries
Jens Axboe [Fri, 1 Dec 2017 04:29:32 +0000 (21:29 -0700)]
options: warn if we exceed the supported number of split entries

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoDocumentation: add note about how many bssplit and zones fio supports
Jens Axboe [Fri, 1 Dec 2017 04:28:15 +0000 (21:28 -0700)]
Documentation: add note about how many bssplit and zones fio supports

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoioengine: don't account verify bytes
Jens Axboe [Fri, 1 Dec 2017 03:24:54 +0000 (20:24 -0700)]
ioengine: don't account verify bytes

If we do that, we can terminate early for a readwrite+verify
backlog workload.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoclient: fix use-after-free for client timeout
Jens Axboe [Fri, 1 Dec 2017 02:50:34 +0000 (19:50 -0700)]
client: fix use-after-free for client timeout

We free the reply, but if it times out, we dereference it afterwards.
Store the opcode before calling into handle_cmd_timeout().

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoengines/dev-dax: fix leak of 'sfile' in error case
Jens Axboe [Fri, 1 Dec 2017 02:48:25 +0000 (19:48 -0700)]
engines/dev-dax: fix leak of 'sfile' in error case

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agot/verify-state: fix leak in error case
Jens Axboe [Fri, 1 Dec 2017 02:47:42 +0000 (19:47 -0700)]
t/verify-state: fix leak in error case

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agobackend: make it clear that we passed 'fd' to the new thread
Jens Axboe [Fri, 1 Dec 2017 02:45:05 +0000 (19:45 -0700)]
backend: make it clear that we passed 'fd' to the new thread

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agogettime-thread: fix failure to check setaffinity return value
Jens Axboe [Fri, 1 Dec 2017 02:41:22 +0000 (19:41 -0700)]
gettime-thread: fix failure to check setaffinity return value

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoDocumentation cleanup
Jens Axboe [Fri, 1 Dec 2017 02:17:38 +0000 (19:17 -0700)]
Documentation cleanup

- Space at end-of-line for the significant_figures change
- > 80 char line section in HOWTO

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agooptions: don't overrun bssplit array
Jens Axboe [Thu, 30 Nov 2017 23:49:23 +0000 (16:49 -0700)]
options: don't overrun bssplit array

Since we now have a different number of splits we support for
zones and block size splits, make sure we pass in the right
max.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoBump support of zones to 256 max
Jens Axboe [Thu, 30 Nov 2017 23:47:27 +0000 (16:47 -0700)]
Bump support of zones to 256 max

This moves it from 64 to 256.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agosteadystate: make flags conform to usual fio standard
Jens Axboe [Thu, 30 Nov 2017 23:43:18 +0000 (16:43 -0700)]
steadystate: make flags conform to usual fio standard

__VAL are usually bit shift values, with VAL being the proper
mask. For some reason, the steadystate code uses both as
masks, fix that up.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoserver: process connection list before executing trigger
Jens Axboe [Thu, 30 Nov 2017 20:28:48 +0000 (13:28 -0700)]
server: process connection list before executing trigger

This shrinks the window a bit for allowing the backend to notice
that jobs have gone away, and notify the client.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoclient: ignore a client timeout, if the last thing we saw as a trigger
Jens Axboe [Thu, 30 Nov 2017 20:27:40 +0000 (13:27 -0700)]
client: ignore a client timeout, if the last thing we saw as a trigger

If triggers are used and are fatal to the fio backend (killing power,
etc), then we don't have time to process the stop/quit commands. We
expect the client to go away, but the backend can't let us know.

If the last thing we saw was a trigger command, don't exit in error
if the client times out and goes away.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agofio: add check rate flag
Jens Axboe [Thu, 30 Nov 2017 17:59:25 +0000 (10:59 -0700)]
fio: add check rate flag

One of the things we do a lot for each IO, is check if we should be
checking the rate. Add a specific flag for that case, so we can answer
that question very cheaply.

This is good for more than a 5% speedup for a null engine test case.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoio_u: speed up small_content_scramble()
Jens Axboe [Thu, 30 Nov 2017 16:18:37 +0000 (09:18 -0700)]
io_u: speed up small_content_scramble()

This is a hot path for write workloads, since we don't want to send the
same buffers to the device again and again. The idea is to defeat basic
dedupe/compression, but slightly modifying the buffer for each write.
small_content_scramble() does this by filling in the io_u offset into a
random spot in each 512b chunk of an io buffer, and filling in the start
time (sec,nsec) at the end of each 512b chunk.

With this change, we still do those two things, but we generate a random
cacheline within each 512b chunk, and fill the offset at the beginning
of the cacheline, and the time at the end of it.  This means that
instead of potentially dirtying 2 cachelines for each 512b chunk in an
IO buffer, we dirty just 1.

The results should still be random enough that small_content_scramble()
fullfils the promise to defeat basic dedupe and compression, but it is
lighter to run.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoio_u: cleanup check_get_trim()
Jens Axboe [Thu, 30 Nov 2017 14:03:33 +0000 (07:03 -0700)]
io_u: cleanup check_get_trim()

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoio_u: tweak small content buffer scramble
Jens Axboe [Thu, 30 Nov 2017 13:50:36 +0000 (06:50 -0700)]
io_u: tweak small content buffer scramble

We currently generate a 'random' offset in a 512b chunk to fill in
the offset. Since we don't want the later time scramble to
overwrite it, we check and adjust for that. Instead just ensure that
we generate a random offset in the first half of the 512b chunk,
then we know we never overlap.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoio_u: use nsec value for buffer scramble
Jens Axboe [Thu, 30 Nov 2017 13:26:21 +0000 (06:26 -0700)]
io_u: use nsec value for buffer scramble

Just use the nanosecond value directly, it's pointless to shift
it down and lose 10 bits with of scrambling data.

Fixes: d5d3795c ("io_u: don't do expensive int divide for buffer scramble")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agooptions: correct parser type for max_latency
Jens Axboe [Thu, 30 Nov 2017 05:11:09 +0000 (22:11 -0700)]
options: correct parser type for max_latency

It's a 64-bit type now, use the proper time conversion type.

Fixes: c3a32714 ("Change latency targets to be in nsec values internally")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoverify: convert hdr time to sec+nsec
Jens Axboe [Thu, 30 Nov 2017 05:00:35 +0000 (22:00 -0700)]
verify: convert hdr time to sec+nsec

Use the internal values instead of converting.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoverify: kill unneeded forward declaration
Jens Axboe [Thu, 30 Nov 2017 04:58:28 +0000 (21:58 -0700)]
verify: kill unneeded forward declaration

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoChange latency targets to be in nsec values internally
Jens Axboe [Thu, 30 Nov 2017 04:52:46 +0000 (21:52 -0700)]
Change latency targets to be in nsec values internally

Since all of our timekeeping is in nsec now, it's easier to convert
these at init time and not have to do it at runtime.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agooptions: make max_latency a 64-bit variable
Jens Axboe [Thu, 30 Nov 2017 04:47:43 +0000 (21:47 -0700)]
options: make max_latency a 64-bit variable

Also removes one pad in the thread options. This should bump
the protocol version, but we just did that, so let it slide.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agooptions: make it clear that max_latency is in usecs
Jens Axboe [Thu, 30 Nov 2017 04:30:21 +0000 (21:30 -0700)]
options: make it clear that max_latency is in usecs

The other latency options include this in their long name.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoio_u: do nsec -> usec converison in one spot in account_io_completion()
Jens Axboe [Thu, 30 Nov 2017 04:25:32 +0000 (21:25 -0700)]
io_u: do nsec -> usec converison in one spot in account_io_completion()

Should not matter for runtime, but it's cleaner.

What we should really do is convert the internal values to nsec, so
we don't have to do this conversion.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoio_u: don't do expensive int divide for buffer scramble
Jens Axboe [Thu, 30 Nov 2017 04:01:36 +0000 (21:01 -0700)]
io_u: don't do expensive int divide for buffer scramble

We don't need the conversion from nsec to usec to be exact, so
just shift by 10 instead.

Fixes: 8b6a404cd ("nanosecond: initial commit changing timeval to timespec")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoUnify max split zone support
Jens Axboe [Thu, 30 Nov 2017 03:51:09 +0000 (20:51 -0700)]
Unify max split zone support

We have two different defines, use the one from the networking
protocol. Add a compile time check that bssplit and zones
have the same max, so we don't inadvertently add an overflow
condition if we change one of them.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoio_u: cleanup and simplify __get_next_rand_offset_zoned_abs()
Jens Axboe [Thu, 30 Nov 2017 03:45:33 +0000 (20:45 -0700)]
io_u: cleanup and simplify __get_next_rand_offset_zoned_abs()

We can drop various variables, it's easier to read this way too.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoexamples/rand-zones.fio: add zoned_abs example
Jens Axboe [Thu, 30 Nov 2017 02:29:25 +0000 (19:29 -0700)]
examples/rand-zones.fio: add zoned_abs example

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoAdd support for absolute random zones
Jens Axboe [Thu, 30 Nov 2017 02:25:59 +0000 (19:25 -0700)]
Add support for absolute random zones

We currently support random_distribution=zoned, which allows the user
to specify a percentage of access to a zoned define as a percentage
of the file/device size. This commit adds support for zoned_abs,
which works exactly like zoned, except you give the zone size in
an absolute value.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agooptions: don't quicksort zoned distribution series
Jens Axboe [Wed, 29 Nov 2017 19:37:30 +0000 (12:37 -0700)]
options: don't quicksort zoned distribution series

If we do that, we mess up the distribution.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoRevert "Avoid irrelevant "offset extend ends" error message for chrdev"
Tomohiro Kusumi [Wed, 29 Nov 2017 09:29:22 +0000 (11:29 +0200)]
Revert "Avoid irrelevant "offset extend ends" error message for chrdev"

This reverts commit 0f34169ac64f009b193bed1c8fb6692844bf99c2.

> Commit 0f34169a broke it, moving a check from a non-character
> device path up a level to where it now triggers on a character
> device (for which the size is left set to -1ULL).
>
> This gets it working again:
>         git revert 0f34169a
>         make
>
> Tomohiro, could you help prepare a better fix?

Sorry, I'll just revert it at the moment.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoinit: did_arg cleanup
Jens Axboe [Tue, 28 Nov 2017 23:00:22 +0000 (16:00 -0700)]
init: did_arg cleanup

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoinit: remove dead code
Jens Axboe [Tue, 28 Nov 2017 21:02:11 +0000 (14:02 -0700)]
init: remove dead code

We know did_arg == 0 here, so kill the other part.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoinit: check and fail status-interval settings that are too small
Jens Axboe [Tue, 28 Nov 2017 17:11:53 +0000 (10:11 -0700)]
init: check and fail status-interval settings that are too small

Smallest possible value is 1ms, so fail any setting that yields
a value less than that.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agodocs: Add documention for RDMA ioengine options.
Stephen Bates [Thu, 23 Nov 2017 19:21:56 +0000 (12:21 -0700)]
docs: Add documention for RDMA ioengine options.

Add documentation to HOWTO and the man page for the RDMA ioengine
options as these were missing.

Signed-off-by: Stephen Bates <sbates@raithlin.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge branch 'cleanup' of https://github.com/sitsofe/fio
Jens Axboe [Thu, 23 Nov 2017 02:58:21 +0000 (19:58 -0700)]
Merge branch 'cleanup' of https://github.com/sitsofe/fio

6 years agodoc: reword buffer_compress_percentage, buffer_compress_chunk, dedupe_percentage
Sitsofe Wheeler [Wed, 22 Nov 2017 22:58:10 +0000 (22:58 +0000)]
doc: reword buffer_compress_percentage, buffer_compress_chunk, dedupe_percentage

Make the documentation for these options better reflect how buffer
compression and dedupe tuning can be used since commit
1de80624466405bccdbc4607d71cd249320da3f1 ("Default buffer_compress_chunk
to 512").

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoHOWTO: fix up broken formatting in logging options
Sitsofe Wheeler [Wed, 22 Nov 2017 22:38:18 +0000 (22:38 +0000)]
HOWTO: fix up broken formatting in logging options

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoadd significant_figures parameter
Jeff Furlong [Wed, 22 Nov 2017 18:38:33 +0000 (11:38 -0700)]
add significant_figures parameter

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agordma: Add bind option
Stephen Bates [Wed, 22 Nov 2017 18:24:56 +0000 (11:24 -0700)]
rdma: Add bind option

In certain configurations it can be useful to bind a rdma_cm to a
particular network interface. For example in multi-path or loopback.

Add a bindname option that the local rdma_cm will try and bind too.

The bind code is based off that used in rping [1].

[1] https://github.com/linux-rdma/rdma-core/blob/ \
    master/librdmacm/examples/rping.c

Signed-off-by: Stephen Bates <sbates@raithlin.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge branch 'libpmem'
Jens Axboe [Fri, 17 Nov 2017 16:21:19 +0000 (09:21 -0700)]
Merge branch 'libpmem'

Merge in libpmem engine, with fixes.

6 years agoexamples/libpmem.fio: clean up example
Jens Axboe [Fri, 17 Nov 2017 16:20:52 +0000 (09:20 -0700)]
examples/libpmem.fio: clean up example

Spelling errors, typos, etc.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agolibpmem: move mmap alignment to init time
Jens Axboe [Fri, 17 Nov 2017 16:19:26 +0000 (09:19 -0700)]
libpmem: move mmap alignment to init time

Also use the generally available page_size, don't need to roll our
own in there.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agolibpmem: code cleanups
Jens Axboe [Fri, 17 Nov 2017 16:16:44 +0000 (09:16 -0700)]
libpmem: code cleanups

No functional changes in this patch.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge branch 'add-libpmem-engine' of https://github.com/tishizaki/fio into libpmem
Jens Axboe [Fri, 17 Nov 2017 16:03:23 +0000 (09:03 -0700)]
Merge branch 'add-libpmem-engine' of https://github.com/tishizaki/fio into libpmem

6 years agofio: add libpmem engine
Teruaki Ishizaki [Fri, 17 Nov 2017 02:54:26 +0000 (11:54 +0900)]
fio: add libpmem engine

Adding an ioengine that access with the libpmem as memory
through a memory mmaped file on DAX filesystem.

It's very similar to the mmap engine and the dev-dax engine.

Signed-off-by: Teruaki Ishizaki <ishizaki.teruaki@lab.ntt.co.jp>
Signed-off-by: Takashi Menjo <menjo.takashi@lab.ntt.co.jp>
6 years agoioengines: remove pointless list initializations
Jens Axboe [Fri, 17 Nov 2017 03:03:15 +0000 (20:03 -0700)]
ioengines: remove pointless list initializations

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoos: make fio_cpu_isset() return a bool
Jens Axboe [Thu, 16 Nov 2017 21:16:41 +0000 (14:16 -0700)]
os: make fio_cpu_isset() return a bool

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoos-windows: fix cpumask operations
Robert Elliott [Tue, 14 Nov 2017 02:22:09 +0000 (20:22 -0600)]
os-windows: fix cpumask operations

Fix cpumask manipulation on (64-bit) Windows systems.

cpus_allowed=nn values greater than 32 does not work, due to
* the compiler not promoting expressions like "1 << cpu" to
  64 bits
* the clear function clearing the wrong bit (using "cpu - 1"),
* the clear function using XOR to clear (which only works if the
  bit was previously set)
* the check function returning a 64-bit value through a 32-bit
  return value

Example problems (from extra debug prints):
* setting CPU 32 really sets bit 0 (CPU 0)
Set mask of 0000000000000000 to add 0000000000000001 (32)

* setting CPU 63 really sets bit 31 (CPU 31)
Set mask of 0000000000000000 to add 0000000080000000 (63)

* clearing CPU 0 really clears bit 63 (CPU 63)
Clear mask of 0000000055555555 to remove 8000000000000000 (0)

* clearing CPU 2 really clears bit 2 (CPU 2)
Clear mask of 0000000055555555 to remove 0000000000000002 (2)

* checking claims CPU 32 is not in a mask of CPUs {32,34,36,38}
for 0000005500000000 check if bit 32 is set ==> FALSE

Tested with x86_64-w64-mingw32-gcc 6.4.0 from cygwin on a system
with 64 CPU cores (all fitting in one Windows processor group).

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years ago.gitignore: ignore .exe files (for Windows)
Robert Elliott [Mon, 13 Nov 2017 21:56:59 +0000 (15:56 -0600)]
.gitignore: ignore .exe files (for Windows)

Make git ignore .exe files, which are generated by Windows
cygwin builds.

Examples:
        new file:   fio.exe
        new file:   t/axmap.exe
        new file:   t/fio-dedupe.exe
        new file:   t/fio-genzipf.exe
        new file:   t/fio-verify-state.exe
        new file:   t/gen-rand.exe
        new file:   t/ieee754.exe
        new file:   t/lfsr-test.exe
        new file:   t/stest.exe

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoman page: fix bad case for 'pre-reading file' state
Jens Axboe [Wed, 15 Nov 2017 16:53:14 +0000 (09:53 -0700)]
man page: fix bad case for 'pre-reading file' state

Fixes: https://github.com/axboe/fio/issues/491
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge branch 'fix-libhdfs' of https://github.com/follitude/fio
Jens Axboe [Mon, 6 Nov 2017 16:11:07 +0000 (09:11 -0700)]
Merge branch 'fix-libhdfs' of https://github.com/follitude/fio

6 years agoMakefile: tiny fix of libhdfs
follitude [Mon, 6 Nov 2017 12:28:20 +0000 (20:28 +0800)]
Makefile: tiny fix of libhdfs

6 years agoFio 3.2 fio-3.2
Jens Axboe [Fri, 3 Nov 2017 21:23:49 +0000 (15:23 -0600)]
Fio 3.2

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge branch 'json_bw_bytes' of https://github.com/sitsofe/fio
Jens Axboe [Fri, 3 Nov 2017 18:37:03 +0000 (12:37 -0600)]
Merge branch 'json_bw_bytes' of https://github.com/sitsofe/fio

6 years agosolaris: add get_fs_free_size() implementation
Tomohiro Kusumi [Fri, 3 Nov 2017 16:46:03 +0000 (18:46 +0200)]
solaris: add get_fs_free_size() implementation

Copied from os/os-freebsd.h. POSIX statvfs works on Solaris
(actually compiled/tested on illumos) as well.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agosolaris: add os_phys_mem() implementation
Tomohiro Kusumi [Fri, 3 Nov 2017 16:46:02 +0000 (18:46 +0200)]
solaris: add os_phys_mem() implementation

Copied from os/os-linux.h. The standard sysconf(3C) names work on
Solaris (actually compiled/tested on illumos) as well.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agosolaris: #include <pthread.h>
Tomohiro Kusumi [Fri, 3 Nov 2017 16:46:01 +0000 (18:46 +0200)]
solaris: #include <pthread.h>

os/os-solaris.h header uses pthread, but doesn't include <pthread.h>
which should be to be able to include this header alone.
Needed for unittesting of OS specific stuff.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agostat: add bw_bytes JSON key
Sitsofe Wheeler [Fri, 3 Nov 2017 07:23:55 +0000 (07:23 +0000)]
stat: add bw_bytes JSON key

Fixes: https://github.com/axboe/fio/issues/422
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoio_u_queue: convert rings to bool
Jens Axboe [Thu, 2 Nov 2017 18:26:39 +0000 (12:26 -0600)]
io_u_queue: convert rings to bool

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agofilesetup: allocate 'r' locally in fallocate_file()
Jens Axboe [Thu, 2 Nov 2017 15:09:31 +0000 (09:09 -0600)]
filesetup: allocate 'r' locally in fallocate_file()

For platforms that don't have posix or linux fallocate, we trigger
a warning on 'r' being unused.

Fixes: c0aabe37db1b ("filesetup: don't print non-debug error on native fallocate failure")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agofilesetup: recurse_dir() can use bool
Jens Axboe [Thu, 2 Nov 2017 15:07:11 +0000 (09:07 -0600)]
filesetup: recurse_dir() can use bool

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agofilesetup: create_work_dirs() can return bool
Jens Axboe [Thu, 2 Nov 2017 15:06:14 +0000 (09:06 -0600)]
filesetup: create_work_dirs() can return bool

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agofilesetup: change random file init to be bool based
Jens Axboe [Thu, 2 Nov 2017 15:04:56 +0000 (09:04 -0600)]
filesetup: change random file init to be bool based

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agofilesetup: __init_rand_distribution() can be void
Jens Axboe [Thu, 2 Nov 2017 15:00:04 +0000 (09:00 -0600)]
filesetup: __init_rand_distribution() can be void

It can no longer fail, just make it void.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agofilesetup: pre_read_files() can use a bool
Jens Axboe [Thu, 2 Nov 2017 14:59:07 +0000 (08:59 -0600)]
filesetup: pre_read_files() can use a bool

This flips the success return from 0 to true.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agofilesetup: don't inline native_fallocate()
Jens Axboe [Thu, 2 Nov 2017 14:55:44 +0000 (08:55 -0600)]
filesetup: don't inline native_fallocate()

The compiler will figure this out, and it isn't a performance
hot path.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agofilesetup: don't print non-debug error on native fallocate failure
Jens Axboe [Thu, 2 Nov 2017 14:53:54 +0000 (08:53 -0600)]
filesetup: don't print non-debug error on native fallocate failure

We expect this to fail in cases where it isn't available, so don't
clutter the standard/error output with it.

Also ensure that native_fallocate() returns true/false, since it's
a bool function. Just a cleanup, no functional change there.

Fixes: 2c3e17be4c7c ("filesetup: add native fallocate")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoio_u: reset file to initial offset
Jens Axboe [Wed, 1 Nov 2017 20:51:03 +0000 (14:51 -0600)]
io_u: reset file to initial offset

Don't assume that initial offset is 0, we should use the set
f->file_offset when resetting.

Fixes: 17373ce2f38a ("io_u: wrap to beginning when end-of-file is reached for time_based")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoio_u: wrap to beginning when end-of-file is reached for time_based
Jens Axboe [Wed, 1 Nov 2017 17:02:30 +0000 (11:02 -0600)]
io_u: wrap to beginning when end-of-file is reached for time_based

The logic around using io_size isn't correct.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoengines/windowsaio: style fixups
Jens Axboe [Tue, 31 Oct 2017 20:01:16 +0000 (14:01 -0600)]
engines/windowsaio: style fixups

No functional changes in this patch.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoDefault buffer_compress_chunk to 512
Jens Axboe [Tue, 31 Oct 2017 16:50:03 +0000 (10:50 -0600)]
Default buffer_compress_chunk to 512

This makes us behave better out of the box, for the cases where
people use bigger block sizes. Without this change and if the
user set buffer_compress_percentage=50 and bs=128k, then we'd
have 64k of zeroes at the end. This is probably not what the
user expects.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoUpdate compression documentation
Jens Axboe [Tue, 31 Oct 2017 16:18:54 +0000 (10:18 -0600)]
Update compression documentation

Make it clearer (hopefully) that buffer_compress_chunk should be
used if the user wants a finer granularity than the write block
size.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoinit: make sure that compression enables refill buffers
Jens Axboe [Tue, 31 Oct 2017 14:55:02 +0000 (08:55 -0600)]
init: make sure that compression enables refill buffers

Otherwise the results aren't going to be great.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoMerge branch 'misc' of https://github.com/sitsofe/fio
Jens Axboe [Mon, 30 Oct 2017 15:05:43 +0000 (09:05 -0600)]
Merge branch 'misc' of https://github.com/sitsofe/fio

Pull misc packaging fixes from Sitsofe:

"Fixes to appease stricter packaging guidelines and some documentation
changes.  The big one is updating the COPYING file in fio to use the one
from https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt . It's worth
double checking that it was a like-for-like replacement given the
significance of the file..."

6 years agodoc: rewrite write_*_log sections
Sitsofe Wheeler [Sun, 29 Oct 2017 16:08:51 +0000 (16:08 +0000)]
doc: rewrite write_*_log sections

- Put the big example of how log files work in write_bw_log and make the
  other sections reference that option so there's less repetition.
- Add a note that the write_hist_log depends on log_hist_msec.
- Make a link from log_hist_coarseness to write_hist_log.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agodoc: minor formatting fixes
Sitsofe Wheeler [Sun, 29 Oct 2017 09:29:38 +0000 (09:29 +0000)]
doc: minor formatting fixes

- Fix broken HOWTO formatting in serialize_overlap.
- Make a link to (and correct the name of) latency_target option within
  Interpreting the output, IO latency.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agodoc: IO -> I/O, sync filecreate documentation
Sitsofe Wheeler [Sun, 29 Oct 2017 09:08:14 +0000 (09:08 +0000)]
doc: IO -> I/O, sync filecreate documentation

Change IO -> I/O and copy the filecreate description from the HOWTO to
the man page.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agofio: update FSF address
Sitsofe Wheeler [Sun, 29 Oct 2017 09:04:24 +0000 (09:04 +0000)]
fio: update FSF address

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoCOPYING: update license file
Sitsofe Wheeler [Sun, 29 Oct 2017 08:45:48 +0000 (08:45 +0000)]
COPYING: update license file

Change COPYING to use the most recent version of the GPLv2 license file
making the following changes:
- Updates the FSF address.
- Changes some formatting.
- Changes "GNU Library General Public License" to "GNU Lesser General
  Public License".

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agodoc: fix groff line that started with a dot
Sitsofe Wheeler [Sun, 29 Oct 2017 08:29:12 +0000 (08:29 +0000)]
doc: fix groff line that started with a dot

It's illegal to start a groff line with a dot if it's not part of a
macro so use the workaround described on
https://stackoverflow.com/questions/11469341/escaping-dots-in-groff/11566859#11566859
to solve the problem.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agofio: fix interpreter lines
Sitsofe Wheeler [Sun, 29 Oct 2017 16:24:24 +0000 (16:24 +0000)]
fio: fix interpreter lines

Minor changes to adhere to various distro packaging guidelines (e.g.
https://fedoraproject.org/wiki/Packaging:Guidelines#Shebang_lines ):

- doc/conf.py doesn't need an interpreter line because it's not
  executable.
- Make the genfio interpreter line use an absolute path rather than env.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agotools: use /usr/bin/python2.7 as the interpreter
Sitsofe Wheeler [Sun, 29 Oct 2017 08:05:47 +0000 (08:05 +0000)]
tools: use /usr/bin/python2.7 as the interpreter

Distros such as Fedora
(https://fedoraproject.org/wiki/Packaging:Python#Multiple_Python_Runtimes
) are clamping down on python interpreter paths due to the desire to
switch to python3 so /usr/bin/python or /usr/bin/env python are no
longer liked. Unfortunately macOS doesn't ship a /usr/bin/python2 link
so switch all python interpreter paths to /usr/bin/python2.7 as a
compromise.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agosteadystate_tests.py: fix up usage comment
Sitsofe Wheeler [Sun, 29 Oct 2017 07:47:36 +0000 (07:47 +0000)]
steadystate_tests.py: fix up usage comment

Make the comment about usage match the argparse line.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
6 years agoFix 'nice' parameter range: should be -20 to 19, not -19 to 20.
Rebecca Cran [Thu, 26 Oct 2017 21:28:23 +0000 (15:28 -0600)]
Fix 'nice' parameter range: should be -20 to 19, not -19 to 20.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
6 years agoio_u: re-invalidate cache when looping around without file open/close
Jens Axboe [Thu, 26 Oct 2017 18:08:20 +0000 (12:08 -0600)]
io_u: re-invalidate cache when looping around without file open/close

If we're doing buffered IO and we end up wrapping around for a
time based run, then ensure that we re-invalidate the kernel
cache for the file.

Reported-by: Paolo Valente <paolo.valente@linaro.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>