fio.git
5 years agoMerge branch 'expression-parser'
Jens Axboe [Fri, 3 Oct 2014 19:20:16 +0000 (13:20 -0600)]
Merge branch 'expression-parser'

Merge in the arithmetic parser.

5 years agoFio 2.1.13 fio-2.1.13
Jens Axboe [Fri, 3 Oct 2014 19:19:04 +0000 (13:19 -0600)]
Fio 2.1.13

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoengines/libaio: modify getevents and commit error handling
Jens Axboe [Fri, 3 Oct 2014 19:10:23 +0000 (13:10 -0600)]
engines/libaio: modify getevents and commit error handling

If we get some error other than -EAGAIN in getevents(), treat
it as fatal and break.

If we get -ENOMEM on submission, reap events if we can. If we
have no pending events, treat it as a fatal error and break.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoMakefile: exp/fixup-buggy-yacc-output is no more
Jens Axboe [Fri, 3 Oct 2014 16:04:36 +0000 (10:04 -0600)]
Makefile: exp/fixup-buggy-yacc-output is no more

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agomake expression parser handle scientific notation
Stephen M. Cameron [Fri, 3 Oct 2014 01:31:11 +0000 (20:31 -0500)]
make expression parser handle scientific notation

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoengines/libaio: reset 'wait_start' on non-EAGAIN
Jens Axboe [Wed, 1 Oct 2014 14:48:54 +0000 (08:48 -0600)]
engines/libaio: reset 'wait_start' on non-EAGAIN

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoBump IO engine version number
Jens Axboe [Wed, 1 Oct 2014 14:43:58 +0000 (08:43 -0600)]
Bump IO engine version number

Commit 1f440ece6127 modified the ->getevents() hook to have
a const timespec, so we should increment the engine version
number to catch that in external engines.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoengines/libaio: fix submit loop to use 'ld->queued' for exit
Jens Axboe [Wed, 1 Oct 2014 14:42:27 +0000 (08:42 -0600)]
engines/libaio: fix submit loop to use 'ld->queued' for exit

We could have head == tail for a full ring, so use the
amount queued as the gauge instead. This would be very
hard to trigger, as it would require a full ring on entry
and the first submit would have to fail to submit anything
before we loop around.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoexp: we don't need -ly
Jens Axboe [Wed, 1 Oct 2014 04:16:05 +0000 (22:16 -0600)]
exp: we don't need -ly

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoengines/libaio: don't reap on EAGAIN and no pending events
Jens Axboe [Wed, 1 Oct 2014 02:28:45 +0000 (20:28 -0600)]
engines/libaio: don't reap on EAGAIN and no pending events

Instead just loop on submit, since there are no events for us
to reap. This is usually a kernel bug, violating the principle
of forward progress guarantee.

If we can't submit anything in 30 seconds, error out.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoConstify a few more hot paths
Jens Axboe [Tue, 30 Sep 2014 22:04:12 +0000 (16:04 -0600)]
Constify a few more hot paths

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoengines/libaio: fix issue with EAGAIN
Jens Axboe [Tue, 30 Sep 2014 19:33:23 +0000 (13:33 -0600)]
engines/libaio: fix issue with EAGAIN

If we get -EAGAIN on IO submission, we should back off and reap
some events. Currently we just loop trying to resubmit, and this
has been reported to cause hangs in some virtualized environments.
There's no record of this ever being hit on raw metal.

So implement this backoff. Unfortunately it requires rewriting
the io_u tracking in libaio, since otherwise we depend on being
able to submit all the io_u's we are handed. So change the
tracking to be a ring buffer, with submission bumping the head
and completion bumping the tail. With this in place, we can't
stop issuing IO at anytime, since we'll just continue where
we left off.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoConstify 'td' in a few functions
Jens Axboe [Tue, 30 Sep 2014 19:29:57 +0000 (13:29 -0600)]
Constify 'td' in a few functions

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoremove unused bye symbol from arithmetic parser
Stephen M. Cameron [Tue, 30 Sep 2014 16:21:20 +0000 (11:21 -0500)]
remove unused bye symbol from arithmetic parser

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoenable informing arithmetic parser of implicit units
Stephen M. Cameron [Tue, 30 Sep 2014 15:32:28 +0000 (10:32 -0500)]
enable informing arithmetic parser of implicit units

This is so that "runtime=100" can be interpreted as 100 seconds
rather than 100 microseconds, but runtime=(100ms + 100s) can also
get the right answer (in microseconds).

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agodo not call fprintf from yyerror in expression parser
Stephen M. Cameron [Tue, 30 Sep 2014 14:31:04 +0000 (09:31 -0500)]
do not call fprintf from yyerror in expression parser

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoverify that expression parsing code gets the right answer
Stephen M. Cameron [Tue, 30 Sep 2014 13:29:33 +0000 (08:29 -0500)]
verify that expression parsing code gets the right answer

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoTreat colons and commas as end of input in expression parser
Stephen M. Cameron [Tue, 30 Sep 2014 13:44:24 +0000 (08:44 -0500)]
Treat colons and commas as end of input in expression parser

Just like a comment.  This is to allow processing of lists
of numbers separated by colons or commas.  Also, fix the comment
processing to require zero rather than one character after '#'

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoUse calloc() instead of malloc + memset
Jens Axboe [Tue, 30 Sep 2014 16:08:08 +0000 (10:08 -0600)]
Use calloc() instead of malloc + memset

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoHOWTO: fix typo
ordahan [Tue, 30 Sep 2014 14:18:34 +0000 (08:18 -0600)]
HOWTO: fix typo

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoMakefile: properly annotate LEX/YACC parts
Jens Axboe [Tue, 30 Sep 2014 03:39:53 +0000 (21:39 -0600)]
Makefile: properly annotate LEX/YACC parts

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoexp: update man page and HOWTO
Jens Axboe [Tue, 30 Sep 2014 03:32:43 +0000 (21:32 -0600)]
exp: update man page and HOWTO

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoMakefile: PARSER_OBJS is not used anymore
Jens Axboe [Tue, 30 Sep 2014 03:25:54 +0000 (21:25 -0600)]
Makefile: PARSER_OBJS is not used anymore

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agofilesetup: fix a bug where we overwrite the set size
Jens Axboe [Tue, 30 Sep 2014 03:23:51 +0000 (21:23 -0600)]
filesetup: fix a bug where we overwrite the set size

For the null io engine, we don't set file sizes. And we should
not overwrite a potentially legitimate o->size, if total_size
is zero.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoexp: get rid of the #line bug workaround
Jens Axboe [Tue, 30 Sep 2014 02:24:23 +0000 (20:24 -0600)]
exp: get rid of the #line bug workaround

We can use --no-lines to have bison/yacc not emit lines,
hence not hitting the missing newline bug in bision 3.0.2.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoexp: fix shift/reduce conflict complaints
Stephen M. Cameron [Mon, 29 Sep 2014 22:54:09 +0000 (16:54 -0600)]
exp: fix shift/reduce conflict complaints

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoconfigure: fix for the cases where bison provides yacc
Jens Axboe [Mon, 29 Sep 2014 22:44:31 +0000 (16:44 -0600)]
configure: fix for the cases where bison provides yacc

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoMerge branch 'master' into expression-parser
Jens Axboe [Mon, 29 Sep 2014 22:29:32 +0000 (16:29 -0600)]
Merge branch 'master' into expression-parser

5 years agoexp: fix __pow_finite being undefined
Jens Axboe [Mon, 29 Sep 2014 22:29:02 +0000 (16:29 -0600)]
exp: fix __pow_finite being undefined

Convert longs to doubles first, otherwise we fail on older
installs.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoFix compile of t/btrace2fio on RHEL5/CentOS5
Jens Axboe [Mon, 29 Sep 2014 22:07:54 +0000 (16:07 -0600)]
Fix compile of t/btrace2fio on RHEL5/CentOS5

Get these errors:

t/btrace2fio.c:395: undefined reference to `__bswap_32'
t/btrace2fio.c:396: undefined reference to `__bswap_32'
t/btrace2fio.c:397: undefined reference to `__bswap_64'
t/btrace2fio.c:398: undefined reference to `__bswap_64'
t/btrace2fio.c:399: undefined reference to `__bswap_32'
t/btrace2fio.c:400: undefined reference to `__bswap_32'
t/btrace2fio.c:401: undefined reference to `__bswap_32'
t/btrace2fio.c:402: undefined reference to `__bswap_32'
t/btrace2fio.c:403: undefined reference to `__bswap_32'
t/btrace2fio.c:404: undefined reference to `__bswap_16'
t/btrace2fio.c:405: undefined reference to `__bswap_16'

Issue is that os/os-linux.h needs to include byteswap.h.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoMakefile: silence make clean
Jens Axboe [Mon, 29 Sep 2014 22:02:35 +0000 (16:02 -0600)]
Makefile: silence make clean

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoMakefile: silence fixup
Jens Axboe [Mon, 29 Sep 2014 21:06:52 +0000 (15:06 -0600)]
Makefile: silence fixup

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoWire up exp/test-expression-parser
Jens Axboe [Mon, 29 Sep 2014 20:58:21 +0000 (14:58 -0600)]
Wire up exp/test-expression-parser

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoexp: set float output for int modulus
Jens Axboe [Mon, 29 Sep 2014 20:58:06 +0000 (14:58 -0600)]
exp: set float output for int modulus

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoUpdate .gitignore with auto-generated lex/yacc outputs
Jens Axboe [Mon, 29 Sep 2014 20:37:46 +0000 (14:37 -0600)]
Update .gitignore with auto-generated lex/yacc outputs

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agofio: support modulus for the arithmetic parser
Jens Axboe [Mon, 29 Sep 2014 19:20:40 +0000 (13:20 -0600)]
fio: support modulus for the arithmetic parser

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agofio: support exponentiation in expression parser
Stephen M. Cameron [Mon, 29 Sep 2014 18:16:54 +0000 (12:16 -0600)]
fio: support exponentiation in expression parser

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agofio: support suffixes in expression parser
Stephen M. Cameron [Mon, 29 Sep 2014 18:15:35 +0000 (12:15 -0600)]
fio: support suffixes in expression parser

Note that time values in expressions by default have units of microseconds

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agofio: allow arithmetic expressions to be used in job files
Stephen M. Cameron [Mon, 29 Sep 2014 18:10:49 +0000 (12:10 -0600)]
fio: allow arithmetic expressions to be used in job files

However, the arithmetic expressions must be enclosed in parentheses.
That is not a hard requirement, I just did it that way to enable the old
code to be used for the existing job files, to reduce risk of breaking
something that previously worked.

Known issues:

1) if overflow or underflow occurs during the evaluation of arithmetic
expressions, it is not detected.  Likewise, detection of floating point
divide by zero is a bit iffy.  Calculations are carried out both as long
longs and as integers.  If at any point, a double precision floating
point value is used, floating point values are used, and for the final
long long calculation the double is cast to a long long.

There may be other numeric subtleties lurking as well.  These kind of
things are why I require the parentheses to invoke the arithmetic
processing.

2) I made no effort to work this code into the autoconf system.  Have no
idea how to do that, esp. with lex and yacc involved in this.

3) Suffixes (k, M, GiB, etc.) do not work with expressions.  It is
probably not very difficult to fix this.

Signed-off-by: Stephen M. Cameron <stephenmcameron@gmail.com>
Modified by me to make configure auto-detect presence of yacc/lex and
enable the arithmetic only if those conditions are met. Also got rid
of the Makefile in exp/ and added the targets to the general Makefile,
since this makes it easier to do properly.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agot/dedupe: silence 'some_done' unused warning on some compilers
Jens Axboe [Mon, 29 Sep 2014 01:10:24 +0000 (19:10 -0600)]
t/dedupe: silence 'some_done' unused warning on some compilers

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoFix typo in bs_is_seq_ran option help
Jens Axboe [Sun, 28 Sep 2014 22:25:49 +0000 (16:25 -0600)]
Fix typo in bs_is_seq_ran option help

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoClarify what number_ios does in the HOWTO/man page/help
Jens Axboe [Sun, 28 Sep 2014 22:24:23 +0000 (16:24 -0600)]
Clarify what number_ios does in the HOWTO/man page/help

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoFix bug with zone and zone skipping and io_limit
Jens Axboe [Sun, 28 Sep 2014 22:20:58 +0000 (16:20 -0600)]
Fix bug with zone and zone skipping and io_limit

If you do:

dd if=/dev/zero of=/dev/shm/1M bs=1M count=1
fio --bs=4k --rw=write --filename=/dev/shm/1M --name=go \
--zoneskip=4k --zonesize=4k --io_limit=2M

then fio will exit after having performed 512KB of IO, instead
of the specified IO limit. This is a similar issue as was fixed
by commit ac002339c382 with rw sequencing - if we reach the
end of the file with a zone skip, wrap to the beginning.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoFix bug with rw sequence offset and io_limit
Jens Axboe [Sun, 28 Sep 2014 22:18:43 +0000 (16:18 -0600)]
Fix bug with rw sequence offset and io_limit

If you do:

dd if=/dev/zero of=/dev/shm/1M bs=1M count=1
fio --bs=4k --rw=write:4k --filename=/dev/shm/1M --name=go --io_limit=2M

then fio will exit prematurely after having done 128 4KB ios,
so only 512KB are read. This is because after 128 ios, we have
reache the end of the file. Handle this case and wrap around
properly.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agot/dedupe: fixup bloom entry calculation
Jens Axboe [Sun, 28 Sep 2014 03:29:03 +0000 (21:29 -0600)]
t/dedupe: fixup bloom entry calculation

With m/n at 8x and with 5 default hashes for blooming, we should
be around ~2% false positive rate max.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agobloom: up hashes to 5 by default
Jens Axboe [Sun, 28 Sep 2014 03:28:47 +0000 (21:28 -0600)]
bloom: up hashes to 5 by default

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agocrc/test: add fnv
Jens Axboe [Sun, 28 Sep 2014 03:27:48 +0000 (21:27 -0600)]
crc/test: add fnv

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoAdd fnv hash
Jens Axboe [Sun, 28 Sep 2014 03:26:58 +0000 (21:26 -0600)]
Add fnv hash

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agocrc/test: if the checksum needs a _final(), do it in the loop
Jens Axboe [Sat, 27 Sep 2014 20:13:58 +0000 (14:13 -0600)]
crc/test: if the checksum needs a _final(), do it in the loop

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agot/dedupe: print dedupe ratio instead of made-up factor
Jens Axboe [Sat, 27 Sep 2014 20:12:02 +0000 (14:12 -0600)]
t/dedupe: print dedupe ratio instead of made-up factor

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoMove murmur3 hash to crc/
Jens Axboe [Sat, 27 Sep 2014 15:30:56 +0000 (09:30 -0600)]
Move murmur3 hash to crc/

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agocrc/test: add jhash
Jens Axboe [Sat, 27 Sep 2014 15:29:42 +0000 (09:29 -0600)]
crc/test: add jhash

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agocrc/test: fix alignment
Jens Axboe [Sat, 27 Sep 2014 14:43:27 +0000 (08:43 -0600)]
crc/test: fix alignment

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoAdd murmurhash3
Jens Axboe [Sat, 27 Sep 2014 14:38:42 +0000 (08:38 -0600)]
Add murmurhash3

And use it in bloom, add it to the crc tester as well.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agodedupe: exit gracefully if device/file open fails
Jens Axboe [Sat, 27 Sep 2014 14:08:24 +0000 (08:08 -0600)]
dedupe: exit gracefully if device/file open fails

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoparse: fix issue with not filling leftover percentages correctly
Jens Axboe [Sat, 27 Sep 2014 14:08:00 +0000 (08:08 -0600)]
parse: fix issue with not filling leftover percentages correctly

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoImprove dedupe/compression buffer filling for mixed block sizes
Jens Axboe [Fri, 26 Sep 2014 21:04:58 +0000 (15:04 -0600)]
Improve dedupe/compression buffer filling for mixed block sizes

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agobloom: use independent hashes
Jens Axboe [Fri, 26 Sep 2014 20:57:41 +0000 (14:57 -0600)]
bloom: use independent hashes

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoClarify that include files may not contain job sections
Jens Axboe [Fri, 26 Sep 2014 19:45:56 +0000 (13:45 -0600)]
Clarify that include files may not contain job sections

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agobloom: always use a larger minimum size for bloom filter
Jens Axboe [Fri, 26 Sep 2014 19:30:00 +0000 (13:30 -0600)]
bloom: always use a larger minimum size for bloom filter

Increases accuracy at the lower end.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoAdd HOWTO section on include files
Andrey Kuzmin [Fri, 26 Sep 2014 19:29:15 +0000 (13:29 -0600)]
Add HOWTO section on include files

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoAdd ability to use an include file in a fio job file
Andrey Kuzmin [Fri, 26 Sep 2014 18:48:40 +0000 (12:48 -0600)]
Add ability to use an include file in a fio job file

With this patch, we can use the 'include' directive to tell
fio to include the contents of a file inside a job file.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agodedupe: read in larger chunks at the time
Jens Axboe [Fri, 26 Sep 2014 18:47:14 +0000 (12:47 -0600)]
dedupe: read in larger chunks at the time

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agodedupe: fix warning and segfault on -B0
Jens Axboe [Fri, 26 Sep 2014 16:16:53 +0000 (10:16 -0600)]
dedupe: fix warning and segfault on -B0

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agot/lfsr-test: fixup time
Jens Axboe [Fri, 26 Sep 2014 16:01:50 +0000 (10:01 -0600)]
t/lfsr-test: fixup time

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoAdd debug helper stub for t/ programs
Jens Axboe [Fri, 26 Sep 2014 15:58:29 +0000 (09:58 -0600)]
Add debug helper stub for t/ programs

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agodedupe: default to using a bloom filter to save memory
Jens Axboe [Fri, 26 Sep 2014 15:51:33 +0000 (09:51 -0600)]
dedupe: default to using a bloom filter to save memory

With the bloom filter, we can comfortably check devices up to
the petabyte range, which isn't feasible if we track each
extent.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoAdd bloom filter
Jens Axboe [Fri, 26 Sep 2014 15:51:16 +0000 (09:51 -0600)]
Add bloom filter

Very basic, but seems to do the job.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoFix compile for FIO_INC_DEBUG not set
Jens Axboe [Wed, 24 Sep 2014 15:54:24 +0000 (09:54 -0600)]
Fix compile for FIO_INC_DEBUG not set

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agodedupe: print threads used up front
Jens Axboe [Wed, 24 Sep 2014 15:34:47 +0000 (09:34 -0600)]
dedupe: print threads used up front

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agodedupe: remove rb_lock when done
Jens Axboe [Wed, 24 Sep 2014 15:33:29 +0000 (09:33 -0600)]
dedupe: remove rb_lock when done

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agodedupe: cleanups and rate estimation
Jens Axboe [Wed, 24 Sep 2014 15:30:52 +0000 (09:30 -0600)]
dedupe: cleanups and rate estimation

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoMerge branch 'master' of ssh://git.kernel.dk/data/git/fio
Jens Axboe [Wed, 24 Sep 2014 14:21:47 +0000 (08:21 -0600)]
Merge branch 'master' of ssh://git.kernel.dk/data/git/fio

5 years agodedupe: don't add extent items unless we use them
Jens Axboe [Wed, 24 Sep 2014 14:21:15 +0000 (08:21 -0600)]
dedupe: don't add extent items unless we use them

Only used for collision_check and debug output, so save memory
if those aren't enabled.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agot/dedupe: Linux only for now
Jens Axboe [Wed, 24 Sep 2014 00:36:52 +0000 (18:36 -0600)]
t/dedupe: Linux only for now

Just need to fix up the file sizing, that's the only Linux
dependency.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoFix 32-bit compile warnings
Jens Axboe [Tue, 23 Sep 2014 22:06:04 +0000 (16:06 -0600)]
Fix 32-bit compile warnings

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoBuild t/ tools by default
Jens Axboe [Tue, 23 Sep 2014 21:53:32 +0000 (15:53 -0600)]
Build t/ tools by default

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agodedupe: print progress indicator
Jens Axboe [Tue, 23 Sep 2014 20:40:48 +0000 (14:40 -0600)]
dedupe: print progress indicator

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agodedupe: improve wording in output
Jens Axboe [Tue, 23 Sep 2014 20:29:21 +0000 (14:29 -0600)]
dedupe: improve wording in output

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoAdd small tool to check for dedupable contents in a file/device
Jens Axboe [Tue, 23 Sep 2014 20:10:35 +0000 (14:10 -0600)]
Add small tool to check for dedupable contents in a file/device

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoChecksumming updates
Jens Axboe [Tue, 23 Sep 2014 20:08:21 +0000 (14:08 -0600)]
Checksumming updates

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agomemalign: fix off-by-one bug in alignment
Jens Axboe [Tue, 23 Sep 2014 16:59:50 +0000 (10:59 -0600)]
memalign: fix off-by-one bug in alignment

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoFix min/max typeof warnings
Jens Axboe [Tue, 23 Sep 2014 16:38:54 +0000 (10:38 -0600)]
Fix min/max typeof warnings

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agofifo: use minmax.h instead of rolling its own min/max
Jens Axboe [Tue, 23 Sep 2014 16:35:49 +0000 (10:35 -0600)]
fifo: use minmax.h instead of rolling its own min/max

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agodedupe: if percentage is 100, don't go through random + math
Jens Axboe [Mon, 22 Sep 2014 20:20:05 +0000 (14:20 -0600)]
dedupe: if percentage is 100, don't go through random + math

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoBasic support for dedupe
Jens Axboe [Mon, 22 Sep 2014 16:02:07 +0000 (10:02 -0600)]
Basic support for dedupe

This adds and option, dedupe_percentage, that controls how many of
the write IO buffers are identical. For instance, if this is set:

dedupe_percentage=70

then 70% of the write IO buffers will have identical contents. The
specific contents are, as before, controlled by the various options
that set buffer contents or buffer compressibility.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agobtrace2fio: expand rate options, bug fixes
Jens Axboe [Thu, 18 Sep 2014 15:23:55 +0000 (17:23 +0200)]
btrace2fio: expand rate options, bug fixes

Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 years agobtrace2fio: add rate output
Jens Axboe [Wed, 17 Sep 2014 15:58:31 +0000 (17:58 +0200)]
btrace2fio: add rate output

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agobtrace2fio: move file tracking to btrace_pid
Jens Axboe [Wed, 17 Sep 2014 02:17:55 +0000 (20:17 -0600)]
btrace2fio: move file tracking to btrace_pid

We want to keep btrace_out as per-device, potentially. So move
this part since it's per process.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agofio: print io_u errors on one line
Robert Elliott [Tue, 16 Sep 2014 22:09:48 +0000 (17:09 -0500)]
fio: print io_u errors on one line

Print io_u errors on one line and with one log_err command
to keep them from being interrupted by other prints

Old:
fio: io_u error on file /dev/sdt: Input/output error5.1MB/0KB/0KB /s]
[227K/0/0 iops] [eta 02d:10h:53m:36s]
     read offset=145442430976, buflen=4096
fio: io_u error on file /dev/sdt: Input/output error
     read offset=397760724992, buflen=4096

New:
fio: io_u error on file /dev/sdr: Input/output error: write offset=1532626153472, buflen=4096
fio: io_u error on file /dev/sdt: Input/output error: write offset=102684229632, buflen=4096

Signed-off-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoFixup data-direction to name translation
Jens Axboe [Wed, 17 Sep 2014 02:07:59 +0000 (20:07 -0600)]
Fixup data-direction to name translation

We had two of them, and they were both wrong since trim got
introduced. Replace by a single implementation in io_ddir.h,
right where it's defined.

Reported-by: Elliott, Robert <Elliott@hp.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agobtrace2fio: cleanups and inflight hashing
Jens Axboe [Tue, 16 Sep 2014 16:28:42 +0000 (18:28 +0200)]
btrace2fio: cleanups and inflight hashing

Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 years agobtrace2fio: use percentage_random and add filename option
Jens Axboe [Tue, 16 Sep 2014 15:40:03 +0000 (17:40 +0200)]
btrace2fio: use percentage_random and add filename option

Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 years agobtrace2fio: set runtime
Jens Axboe [Tue, 16 Sep 2014 15:35:55 +0000 (17:35 +0200)]
btrace2fio: set runtime

Signed-off-by: Jens Axboe <axboe@kernel.dk>
5 years agoMerge branch 'master' of ssh://git.kernel.dk/data/git/fio
Jens Axboe [Tue, 16 Sep 2014 15:07:51 +0000 (17:07 +0200)]
Merge branch 'master' of ssh://git.kernel.dk/data/git/fio

5 years agoAdd basic tool to turn blktrace into fio job file
Jens Axboe [Tue, 16 Sep 2014 15:06:52 +0000 (17:06 +0200)]
Add basic tool to turn blktrace into fio job file

No documentation yet, it's just a start.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agooptions: fix single use if / for bssplit
Jens Axboe [Tue, 16 Sep 2014 00:51:32 +0000 (18:51 -0600)]
options: fix single use if / for bssplit

It was buggy in that it did not extend to 100%, if nobody else
was part of the group.

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoFio 2.1.12 fio-2.1.12
Jens Axboe [Fri, 12 Sep 2014 18:09:32 +0000 (12:09 -0600)]
Fio 2.1.12

Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoserver: fix wrong use of exit() in server when daemonized
Jens Axboe [Thu, 11 Sep 2014 23:05:58 +0000 (17:05 -0600)]
server: fix wrong use of exit() in server when daemonized

We can't use exit(), or we'll trigger the atexit() hook and
free the shared mem used for mutexes, etc. This can cause a
hang when using a daemonized fio server.

Reported-by: Castor Fu <castor@egocast.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
5 years agoFix hangs due to iodepth_low
Robert Elliott [Thu, 4 Sep 2014 19:51:05 +0000 (13:51 -0600)]
Fix hangs due to iodepth_low

With some combinations of iodepth, iodepth_batch, iodepth_batch_complete,
and io_depth_low, do_io hangs after reaping the first set of completions
since io_u_queued_complete is called requesting more completions than
td->cur_depth.

Example printing min_evts and td->cur_depth in the do/while loop:
waiting on min=96 cd=627
waiting on min=96 cd=531
waiting on min=96 cd=435
waiting on min=96 cd=339
waiting on min=96 cd=243
waiting on min=96 cd=147
waiting on min=96 cd=51
Jobs: 12 (f=12): [r(12)] [43.8% done] [0KB/0KB/0KB /s] [0/0/0 iops] [eta 00m:09s]
...
Jobs: 12 (f=12): [r(12)] [0.0% done] [0KB/0KB/0KB /s] [0/0/0 iops] [eta 2863d:18h:28m:38s]
<fio never exits>

Fix this by adjusting min_evts to the current_depth if that is smaller.

Tested with a jobfile including:
iodepth=1011
iodepth_batch=96
iodepth_batch_complete=96
iodepth_low=1
runtime=15
time_based

Modified by Jens to fix the check, and move it into
io_u_queued_complete() instead of at the caller site.

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