Jeremy Fitzhardinge [Wed, 8 Jul 2015 20:50:35 +0000 (13:50 -0700)]
configure: don't be so eager to overwrite an existing Makefile
Jeremy Fitzhardinge [Wed, 8 Jul 2015 20:27:35 +0000 (13:27 -0700)]
fio: allow for build in separate build directory
Change configure so that it will use its current directory for building,
and the path to the script itself as the source directory.
Change the Makefile to use VPATH to find the source files. Only a few other
things needed to be touched:
- use the full path to the source in wildcard, then strip it off again
- search both build and source for header files
- FIO-VERSION-GEN is in source
- make directories in build as needed
- use $< to refer to input files
- install non-executables from source
Signed-off-by: Jeremy Fitzhardinge <jeremy@exablox.com>
Jens Axboe [Fri, 3 Jul 2015 20:26:08 +0000 (14:26 -0600)]
t/debug: fix 'fio_debug' declaration
debug.h:38:22: warning: type of ‘fio_debug’ does not match original declaration
extern unsigned long fio_debug;
^
t/debug.c:5:14: note: previously declared here
unsigned int fio_debug = 0;
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Fri, 3 Jul 2015 17:47:10 +0000 (11:47 -0600)]
smalloc: smalloc() already clears memory, scalloc() need not do it again
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Tue, 30 Jun 2015 21:31:50 +0000 (15:31 -0600)]
smalloc: fix unused 'int_mask' warning if redzoning is turned off
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Tue, 30 Jun 2015 02:46:31 +0000 (20:46 -0600)]
configure: fixup clang stupidity
Doesn't like doing _Static_assert() on our structure offset
definition:
error: static_assert expression is not an integral constant expression
Lets just include that in the configure test, so we can avoid using
_Static_assert() if that kind of check fails.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Tue, 30 Jun 2015 02:27:37 +0000 (20:27 -0600)]
t/stest: shrink test size from 128MB
We reduced the smalloc size, reduce it in the test cases too.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Mon, 29 Jun 2015 19:19:24 +0000 (13:19 -0600)]
Kill duplicate __sync_fetch_and_add()
We already had CONFIG_SFAA, just missed it. No need to duplicate it,
get rid of it and update the check in workqueue.c.
Signed-off-by: Jens Axboe <axboe@fb.com>
Alireza Haghdoost [Mon, 29 Jun 2015 19:09:37 +0000 (13:09 -0600)]
Use _Static_assert() if available
The current compiletime_assert() doesn't work properly if code
optimization is not enabled, causing all compile time asserts to fail
regardless of the condition. This is because the compiler doesn't
realize that the external function will never get called for the
false case.
Use _Static_assert() if available for compiletime_assert(), and
fallback to the old method if we don't have it.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Mon, 29 Jun 2015 15:34:39 +0000 (09:34 -0600)]
workqueue: make it work on platforms without __sync_fetch_and_add()
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Thu, 25 Jun 2015 17:13:19 +0000 (11:13 -0600)]
Fio 2.2.9
Signed-off-by: Jens Axboe <axboe@fb.com>
Akinobu Mita [Thu, 25 Jun 2015 13:39:41 +0000 (22:39 +0900)]
Fix testing and setting set_options bitmap
set_options bitmap is an array of uint64_t. But while testing and
setting a bit in the bitmap, the bit mask is calculated with an
unsigned long value. For the systems which have 32-bit long type,
upper 32-bit cannot be set correctly.
Fix it by using (uint64_t)1 instead of 1UL to calculate correct bit
mask.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Logan Gunthorpe [Tue, 23 Jun 2015 22:21:07 +0000 (16:21 -0600)]
Modify rdma engine to use proper arguments.
The old rdma options are unintuitive and inflexible. We are also going
to do some experiments with this engine which require adding further
options. Thus we've improved it to take more normal arguments.
The technique is copied from the netio engine. It now requires a
hostname, port and verb option. The fio scripts in the example directory
have been updated. Compatability is also maintained for fio scripts that
use the old options.
Christopher Jacobs [Mon, 22 Jun 2015 21:14:50 +0000 (14:14 -0700)]
add eta and elapsed to root of json output
Jens Axboe [Sat, 20 Jun 2015 17:21:48 +0000 (13:21 -0400)]
Fix latency logging for io_submit_mode=offload
Signed-off-by: Jens Axboe <axboe@fb.com>
Chris Worley [Tue, 16 Jun 2015 15:30:59 +0000 (09:30 -0600)]
HOWTO: make it clear that deviation is standard deviation
Signed-off-by: Jens Axboe <axboe@fb.com>
Tomohiro Kusumi [Thu, 11 Jun 2015 11:24:11 +0000 (20:24 +0900)]
Enable FIO_HAVE_CHARDEV_SIZE on DragonFlyBSD
DragonFlyBSD no longer has block device just like FreeBSD got rid of
it at some point. Enable FIO_HAVE_CHARDEV_SIZE and implement get-size
functions with DragonFlyBSD's ioctl so fio can retrieve correct size
when targets are not regular files.
The following result verifies that df(1) shows the same fs size as
chardev_size() with regards to the character device (block device if
it were on Linux).
--
# uname
DragonFly
# cat ./test3.c
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include "os/os-dragonfly.h"
int main(int argc, char *argv[]) {
struct fio_file f;
unsigned long long bytes;
f.fd = open(argv[1], O_RDONLY);
if (f.fd < 0) {
perror("open");
exit(1);
}
if (chardev_size(&f, &bytes)) {
perror("ioctl");
exit(1);
}
printf("%s %llu\n", argv[1], bytes);
close(f.fd);
return 0;
}
# gcc -Wall -g ./test3.c -o test3
# file /dev/da8
/dev/da8: character special (30/
504430663)
# ./test3 /dev/da8
/dev/da8
31004295168
# newfs /dev/da8 > /dev/null
# mount -t ufs /dev/da8 /mnt
# df -TH /mnt
Filesystem Type Size Used Avail Capacity Mounted on
/dev/da8 ufs 31G 2.0k 28G 0% /mnt
Tomohiro Kusumi [Wed, 10 Jun 2015 17:46:31 +0000 (02:46 +0900)]
Rename get_fs_size() to get_fs_free_size()
get_fs_free_size() seems to be an appropriate name considering
these functions on various os return filesystem's free space by
computing (block_size * number_of_free_blocks) via statfs(2) or
statvfs(2).
Also the caller of this function is get_fs_free_counts().
Tomohiro Kusumi [Wed, 10 Jun 2015 12:45:00 +0000 (21:45 +0900)]
Add get_fs_size() support for BSDs
Add get_fs_size() for FreeBSD/DragonFlyBSD. The same code may
work on NetBSD/OpenBSD as it uses POSIX statvfs(2).
The following results verify df(1) (which also typically uses
statfs(2) or statvfs(2)) shows the same number given that df(1)
output is correct for the given filesystems.
--
# uname
FreeBSD
# cat ./test2.c
#include <stdio.h>
#include "os/os-freebsd.h"
int main(int argc, char *argv[]) {
printf("%s %llu\n", argv[1], get_fs_size(argv[1]));
return 0;
}
# clang -Wall -g ./test2.c -o test2
# ./test2 /
/
102783143936
# df -TH /
Filesystem Type Size Used Avail Capacity Mounted on
/dev/ada0p2 ufs 112G 9.5G 94G 9% /
^^^^^^^^^^^^ ^^^
112G - 9.5G bfree!=bavail
= 102.5G like it differs on ext[234]
--
# uname
DragonFly
# cat ./test2.c
#include <stdio.h>
#include "os/os-dragonfly.h"
int main(int argc, char *argv[]) {
printf("%s %llu\n", argv[1], get_fs_size(argv[1]));
return 0;
}
# gcc -Wall -g ./test2.c -o test2
# ./test2 /
/
450287370240
# df -TH /
Filesystem Type Size Used Avail Capacity Mounted on
ROOT hammer 480G 30G 450G 6% /
Tomohiro Kusumi [Wed, 10 Jun 2015 12:52:45 +0000 (21:52 +0900)]
Add header include for DragonFlyBSD
Add '#include <unistd.h>' to os/os-dragonfly.h for lwp_gettid(2).
(No error on make, but needs <unistd.h> to include this header
independently)
Tomohiro Kusumi [Tue, 9 Jun 2015 23:28:13 +0000 (08:28 +0900)]
Fix compiler warning
The local variable off is uninitialized on 'goto fill'.
Initializing with 0 seems to be appropriate to fix following gcc warning
although off is actually always initialized as the function returns with
1 on 'if (!i)' case.
options.c:920: warning: 'off' may be used uninitialized in this function
Sam Zaydel [Tue, 9 Jun 2015 21:14:20 +0000 (14:14 -0700)]
Dropped commented out part of line.
Sam Zaydel [Tue, 9 Jun 2015 21:11:36 +0000 (14:11 -0700)]
Merge branch 'master' of github.com:axboe/fio into fixtype
Sam Zaydel [Tue, 9 Jun 2015 21:10:25 +0000 (14:10 -0700)]
int may be too small for a size_t on some systems.
Jens Axboe [Tue, 9 Jun 2015 20:00:56 +0000 (14:00 -0600)]
options: use fio_option_is_set() to detect verify setting
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Tue, 9 Jun 2015 14:35:29 +0000 (08:35 -0600)]
verify: cleanup code for verify pattern without headers
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Tue, 9 Jun 2015 14:06:02 +0000 (08:06 -0600)]
verify: fix dumping of received/expected buffers on failure
If verify=pattern is used, we don't have a header to rely on. So
make one up for that case.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Tue, 9 Jun 2015 02:43:43 +0000 (20:43 -0600)]
verify: add raw pattern verify
Add specific verify=pattern that doesn't use any headers, it
just writes the specified pattern and verifies it.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Tue, 9 Jun 2015 00:43:22 +0000 (18:43 -0600)]
backend: don't add to runtime for fake writes
This fixes showing that fio did writes with --verify_only being set,
while in reality it just ended them before submitting to the device.
Signed-off-by: Jens Axboe <axboe@fb.com>
Tomohiro Kusumi [Mon, 8 Jun 2015 10:19:02 +0000 (19:19 +0900)]
Clear sysfs path before reading current ioscheduler from sysfs
switch_ioscheduler() function has a local buffer tmp[] to store
both sysfs path (e.g. /sys/block/`device`/queue/scheduler) and
content of that sysfs path.
In order to properly test strstr() after writing a ioscheduler
string (e.g. "deadline") to sysfs, it needs to memset(0) first.
Otherwise if the content of sysfs path (below (b)) is shorter
than the existing sysfs path in tmp[] (below (a)), then tmp[]
after storing the content of sysfs (below (c) and *haystack of
strstr()) contains remaining part of the sysfs path.
(a) "/sys/block/sdb/queue/scheduler"
(b) "noop [deadline] cfq \n"
(c) "noop [deadline] cfq \nscheduler"
strstr() will result the same given that the remaining part of
the sysfs path is unlikely to contain ioscheduler string, but
the remaining part should still be cleared first.
Jens Axboe [Fri, 5 Jun 2015 14:33:56 +0000 (08:33 -0600)]
configure: add some missing help options
Signed-off-by: Jens Axboe <axboe@fb.com>
Tomohiro Kusumi [Fri, 5 Jun 2015 10:15:43 +0000 (19:15 +0900)]
Fix compile error on non Linux-or-BSDs
e7e136da needed to add #else part with another device_is_mounted()
that returns 0 for non Linux-or-BSDs environment. Any environment
without getmntent(3) or getmntinfo(3) needs a blank function.
Jens Axboe [Thu, 4 Jun 2015 19:45:32 +0000 (13:45 -0600)]
init: automate displaying debug categories
Better than having them hardwired, so we don't have to update the
code in several places when adding new categories.
Signed-off-by: Jens Axboe <axboe@fb.com>
Tomohiro Kusumi [Tue, 2 Jun 2015 14:40:44 +0000 (23:40 +0900)]
Add device_is_mounted() support for BSDs
Implement '#elif' part of lib/mountcheck.c using getmntinfo(3).
This should implement device_is_mounted() on most BSDs, and has been
tested on FreeBSD/DragonFlyBSD. NetBSD/OpenBSD do have getmntinfo(3)
but may need to include different headers according to their online
manpages.
--
# cat ./test1.c
#include <stdio.h>
#include "./lib/mountcheck.h"
int main(int argc, char *argv[]) {
printf("%s %d\n", argv[1], device_is_mounted(argv[1]));
return 0;
}
--
# uname
FreeBSD
# clang -Wall -g ./test1.c ./lib/mountcheck.o -o ./test1
# ./test1 /dev/ada0p2 /* UFS */
/dev/ada0p2 1
# ./test1 zfs /* ZFS */
zfs 1
# ./test1 zfs/test /* ZFS */
zfs/test 1
# ./test1 /dev/da0 /* not mounted device */
/dev/da0 0
# ./test1 random /* irrelevant string */
random 0
--
# uname
DragonFly
# gcc -Wall -g ./test1.c ./lib/mountcheck.o -o ./test1
# ./test1 /pfs/@@-1:00005 /* HAMMER */
/pfs/@@-1:00005 1
# ./test1 procfs /* procfs */
procfs 1
# ./test1 /dev/da8 /* not mounted device */
/dev/da8 0
# ./test1 random /* irrelevant string */
random 0
Jens Axboe [Mon, 1 Jun 2015 14:32:45 +0000 (08:32 -0600)]
Merge branch 'req6' of git://github.com/kusumi/fio
Tomohiro Kusumi [Mon, 1 Jun 2015 13:21:29 +0000 (22:21 +0900)]
Minor cleanups on cleanup()
Sync with the way other engines implement cleanup() that is regarded
as a better practice. td->io_ops->data should have null check before
dereference and its members can be freed without null check.
Tomohiro Kusumi [Mon, 1 Jun 2015 12:32:37 +0000 (21:32 +0900)]
Fix build error on non-GNU environment
'#include <mntent.h>' needs to be inside '#ifdef CONFIG_GETMNTENT'
and that was probably the intention of the commit
aae599ba.
e.g. BSDs are likely to hit following compile error.
--
lib/mountcheck.c:3:20: fatal error: mntent.h: No such file or directory
compilation terminated.
Makefile:275: recipe for target 'lib/mountcheck.o' failed
gmake: *** [lib/mountcheck.o] Error 1
Jens Axboe [Sat, 30 May 2015 19:04:33 +0000 (13:04 -0600)]
rdma: adapt to new init_rand_seed()
engines/rdma.c: In function ‘fio_rdmaio_setup’:
engines/rdma.c:1205: error: too few arguments to function ‘init_rand_seed’
make: *** [engines/rdma.o] Error 1
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Sat, 30 May 2015 01:40:21 +0000 (19:40 -0600)]
filesetup: print warning if chosen random generator can't cover range
If the file or device is huge, we could have an issue with the
default 32-bit random offset generator in that it wont cover
the entire device. If fio detects this and the random generator
wasn't explicitly set, then log an error and exit.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Fri, 29 May 2015 18:49:54 +0000 (12:49 -0600)]
rand: add 64-bit tausworthe variant with a 2^258 cycle
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Fri, 29 May 2015 16:44:19 +0000 (10:44 -0600)]
Add Intel rdrand support
Not wired up.
Signed-off-by: Jens Axboe <axboe@fb.com>
Ben England [Tue, 26 May 2015 19:12:46 +0000 (15:12 -0400)]
treat error in addr conversion to string as non-fatal
Ben England [Mon, 25 May 2015 12:26:24 +0000 (08:26 -0400)]
embed server address, not other end's address
Jens Axboe [Fri, 22 May 2015 15:09:49 +0000 (09:09 -0600)]
cconv: add allow_mounted_write
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Fri, 22 May 2015 03:43:48 +0000 (21:43 -0600)]
Add 'allow_mounted_write' option
If this isn't set, then fio will abort if a job exists that would write
to a mounted device or partition.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Fri, 22 May 2015 03:19:14 +0000 (21:19 -0600)]
Add start of mount check
For raw block devices, lets add some safety check that will check for
destructive tests whether a device is mounted or not. Will plumb this
in soon, and add an override option to continue regardless.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Sat, 16 May 2015 02:13:58 +0000 (20:13 -0600)]
Merge branch 'req4' of git://github.com/kusumi/fio
Tomohiro Kusumi [Sat, 16 May 2015 01:10:57 +0000 (10:10 +0900)]
Add missing fio_mutex_up() on return
Call fio_mutex_up() before returning from this function.
Tomohiro Kusumi [Sat, 16 May 2015 01:17:14 +0000 (10:17 +0900)]
Cleanup DragonFlyBSD support
Remove these define/undef since fio compiles on DragonFlyBSD
without them.
<sys/rb.h> seems to have never existed in DragonFlyBSD history,
and it compiles without these define/undef. It seems this hack
was necessary on some older versions of NetBSD.
Tomohiro Kusumi [Thu, 14 May 2015 20:10:05 +0000 (05:10 +0900)]
Change (blank)cpu affinity macros to inline functions
gcc warns -Wunused-value on some environments (e.g. BSD) when
the following cpu affinity macros are used in non conditional code.
Also removed #ifdef FIO_HAVE_CPU_AFFINITY in gettime-thread.c
since this variable needs to be visible when calling the function.
gettime-thread.c: In function 'gtod_thread_main':
os/os.h:82:36: warning: statement with no effect [-Wunused-value]
#define fio_setaffinity(pid, mask) (0)
^
gettime-thread.c:48:2: note: in expansion of macro 'fio_setaffinity'
fio_setaffinity(gettid(), fio_gtod_cpumask);
Jens Axboe [Thu, 14 May 2015 15:25:10 +0000 (11:25 -0400)]
stat: add comment on why we need return
Signed-off-by: Jens Axboe <axboe@fb.com>
Tomohiro Kusumi [Thu, 14 May 2015 00:36:40 +0000 (09:36 +0900)]
Fix warning from gmake on BSD
stat.c: In function 'block_state_category':
stat.c:514:1: warning: control reaches end of non-void function
[-Wreturn-type]
}
Jens Axboe [Tue, 12 May 2015 15:31:32 +0000 (11:31 -0400)]
Add 'allow_file_create' option
For running certain jobs, it's convenient to tell fio that you never
want it to create files. On Linux, this prevents filling up /dev
with data for cases where the specified block device isn't available.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Mon, 11 May 2015 17:39:36 +0000 (13:39 -0400)]
Add 'per_job_logs' option
If set, this generates bw/clat/iops log with per file private
filenames. If not set, jobs with identical names will share the
log filename. Default: true.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Sun, 10 May 2015 17:16:40 +0000 (11:16 -0600)]
workqueue: style cleanup
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Fri, 8 May 2015 15:21:17 +0000 (09:21 -0600)]
Merge branch 'master' of ssh://git.kernel.dk/data/git/fio
Jens Axboe [Fri, 8 May 2015 15:19:25 +0000 (09:19 -0600)]
random: document default seed value
Instead of hard coding this in the source, just set the default
value for the 'randseed' option'. Then it's visible when looked
up through --cmdhelp=randseed.
Also document that randrepeat is on by default in the HOWTO,
only the man page had this information.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Fri, 8 May 2015 00:19:25 +0000 (18:19 -0600)]
Fio 2.2.8
Signed-off-by: Jens Axboe <axboe@fb.com>
Bruce Cran [Thu, 7 May 2015 22:54:37 +0000 (16:54 -0600)]
Fix Windows installer build: LICENSE is now MORAL-LICENSE
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Thu, 7 May 2015 21:33:10 +0000 (15:33 -0600)]
Use PATH_MAX instead of _POSIX_HOST_NAME_MAX
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Thu, 7 May 2015 21:14:10 +0000 (15:14 -0600)]
README: add git:// for github as well
Signed-off-by: Jens Axboe <axboe@fb.com>
Bruce Cran [Thu, 7 May 2015 20:56:58 +0000 (14:56 -0600)]
Fix compiler warning and test progs linker errors on Windows
Add prototype for ctime_r to os-windows.h to avoid compiler warning.
Link in os/windows/posix.o and lib/hweight.o to allow test progs to
build on Windows.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Thu, 7 May 2015 20:23:38 +0000 (14:23 -0600)]
Fix keyword replacement leaks
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Thu, 7 May 2015 19:46:24 +0000 (13:46 -0600)]
Merge branch 'client-hostfile' of git://github.com/bengland2/fio
Ben England [Thu, 7 May 2015 19:33:40 +0000 (15:33 -0400)]
document changes to --client syntax and behavior
Ben England [Thu, 7 May 2015 18:12:05 +0000 (14:12 -0400)]
allow --client parameter to be pathname containing client host IPs/names
Bruce Cran [Wed, 6 May 2015 22:30:46 +0000 (16:30 -0600)]
Add Windows ctime_r implementation and add empty ioctl.h header
stat.c now uses ctime_r(), so add an implementation for Windows.
It's expected that ioctl.h exists on each platform, even if it's
not used: add an empty file on Windows.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Thu, 7 May 2015 15:52:35 +0000 (09:52 -0600)]
posixaio: use 'errno' for inline error
aio_error() is only for when aio_*() didn't fail submitting.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Thu, 7 May 2015 14:17:05 +0000 (08:17 -0600)]
Ensure that set_name_idx() doesn't exceed target bounds
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Thu, 7 May 2015 14:11:15 +0000 (08:11 -0600)]
Merge branch 'multiclnt-sharedfs-try3' of git://github.com/bengland2/fio
Ben England [Thu, 7 May 2015 13:27:16 +0000 (09:27 -0400)]
allow --client to work with shared filesystem
Jens Axboe [Wed, 6 May 2015 21:21:19 +0000 (15:21 -0600)]
server: bump version
We added fields to the options structure, need a revision bump.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Wed, 6 May 2015 20:20:44 +0000 (14:20 -0600)]
cconv: add missing conversions of block_error_hist and skip_bad
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Wed, 6 May 2015 20:19:20 +0000 (14:19 -0600)]
blktrace: add support for scaling and aligning replays
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Wed, 6 May 2015 20:15:35 +0000 (14:15 -0600)]
Add support for options being a power-of-2
Split out the is_power_of_2() from fio.h and make it independent.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Wed, 6 May 2015 18:36:43 +0000 (12:36 -0600)]
Merge branch 'master' of git://github.com/iuliur/fio
Julius Rus [Wed, 6 May 2015 18:30:18 +0000 (11:30 -0700)]
Make windowsaio match iometer performance. Without this, we see around 60k on local flash while iometer does 100k.
Jens Axboe [Tue, 5 May 2015 18:11:55 +0000 (12:11 -0600)]
libmtd: ->name and ->type_str can't be constant
Signed-off-by: Jens Axboe <axboe@fb.com>
Milton Chiang [Tue, 5 May 2015 09:18:17 +0000 (17:18 +0800)]
ARM: Use generic assembly nop and barrier code for armv8-a
Signed-off-by: Milton Chiang <milton.chiang@mediatek.com>
Brian Fulton [Mon, 4 May 2015 22:07:10 +0000 (16:07 -0600)]
Fix Runtime, IOPS, bandwidth recorded incorrectly
This happens with small sized timed_based runs. Change runtime
tabulation back to microseconds to handle sub millisecond loops.
Signed-off-by: Jens Axboe <axboe@fb.com>
Steven Noonan [Fri, 1 May 2015 19:49:34 +0000 (19:49 +0000)]
lfsr-test: print total elapsed time correctly
The conversion from microseconds to seconds is 1e6 not 1e9.
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Jens Axboe <axboe@fb.com>
Steven Noonan [Fri, 1 May 2015 19:31:44 +0000 (12:31 -0700)]
gettime: add support for CLOCK_MONOTONIC_RAW
The clock CLOCK_MONOTONIC_RAW (introduced in Linux 2.6.28) is similar to
CLOCK_MONOTONIC except that it is not subject to NTP adjustments or incremental
adjustments performed by adjtime().
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Fri, 1 May 2015 23:02:24 +0000 (17:02 -0600)]
blktrace: support for non-512b sector sizes
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Wed, 29 Apr 2015 16:29:16 +0000 (10:29 -0600)]
configure: add support for --prefix
Allows other installation paths that /usr/local
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Tue, 28 Apr 2015 21:30:02 +0000 (15:30 -0600)]
blktrace: only set O_DIRECT if the min bs is a multiple of 4k
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Tue, 28 Apr 2015 21:23:21 +0000 (15:23 -0600)]
Add recommendation to set direct=0 if first O_DIRECT fails
Fio currently tells you:
"fio: first direct IO errored. File system may not support direct IO, or
iomem_align= is bad."
but it doesn't offer a remedy. Add a suggestion to set direct=0 if this
happens. It can happen because of a badly configured job, or from
blktrace replay because the latter adds direct=1 automatically. But that
may fail, if the trace contains IO that isn't sector aligned.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Mon, 27 Apr 2015 15:37:11 +0000 (09:37 -0600)]
dedupe: improve 100% dedupe case
We don't need an on-stack state, just juggle the buf_state and
buf_state_prev appropriately.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Mon, 27 Apr 2015 14:38:33 +0000 (08:38 -0600)]
dedupe: fix dedupe_percentage=100
The corner case of 100% dedupable was buggy, save and restore random
state appropriate for that too.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Fri, 24 Apr 2015 16:45:43 +0000 (10:45 -0600)]
HOWTO: clarify the 'wait' statement in iologs
It's a relative time, not absolute wait.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Fri, 24 Apr 2015 16:41:58 +0000 (10:41 -0600)]
io_u: fix bug in rounding of generated buffer length
If the maximum blocksize isn't a multiple of the minimum blocksize,
then fio has a bug where it will round up the block size and align
it to a size larger than the IO buffer we have. This causes random
memory corruption and crashes.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Fri, 24 Apr 2015 15:03:05 +0000 (09:03 -0600)]
blktrace: fix bugs in accounting
We need to clear the trim part of the accounting arrays, otherwise
we can use bogus values leading to attempting to allocate huge
amounts of memory. This causes fio to exit with:
fio: pid=21428, err=12/file:memory.c:242, func=iomem allocation,
error=Cannot allocate memory
Also improve the depth detection, by making it per data direction
instead of a global state.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Thu, 23 Apr 2015 17:13:27 +0000 (11:13 -0600)]
Merge branch 'io-threads'
Jens Axboe [Thu, 23 Apr 2015 01:54:54 +0000 (19:54 -0600)]
blktrace: only probe and set depth if option isn't set
The comment predates fio's support for checking whether a specific
option was set, we have the power to check this properly now.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Wed, 22 Apr 2015 19:46:45 +0000 (13:46 -0600)]
configure: check for more of the used MTD features
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Tue, 21 Apr 2015 15:39:32 +0000 (09:39 -0600)]
Fix off-by-one in cpus_allowed
Similar to commit
b84113993b3a, fix it for cpus_allowed as well.
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Tue, 21 Apr 2015 14:25:58 +0000 (08:25 -0600)]
Fix off-by-one in cpu mask index handling
This just affects how errors are printed. Kleber Sacilotto de Souza
reports:
The error message displayed by the option parser for the 'cpus_allowed'
parameter is misleading.
My system has 4 processors:
$ grep -c processor /proc/cpuinfo
4
If I provide a high number for cpus_allowed, I get the error message:
$ fio --filename=/tmp/foo.fio --cpus_allowed=5 --name=job1
fio: CPU 5 too large (max=4)
fio: failed parsing cpus_allowed=5
If it says "(max=4)", I would expect it to accept the value "4" if I
want to use the last CPU of the system (even though we know that the
CPUs are generally numbered starting with 0), but that's not what
happens:
$ fio --name=global --filename=/tmp/foo.fio --cpus_allowed=4 --name=job1
job1: (g=0): rw=read, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=1
fio-2.1.3
Starting 1 process
fio: pid=24942, err=22/file:backend.c:1192, func=cpu_set_affinity, error=Invalid argument
So for setting the affinity the CPU number really starts from 0, so 3
would be the right value in this case and the following command works as
expected:
Signed-off-by: Jens Axboe <axboe@fb.com>
Dan Ehrenberg [Mon, 20 Apr 2015 23:20:30 +0000 (16:20 -0700)]
Don't export state variable
There was no reason to export this extra variable. It was just a typo
and it is never used.
Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Dan Ehrenberg [Thu, 16 Apr 2015 21:50:39 +0000 (14:50 -0700)]
Fix mtd valgrind warning
strlen seems to operate in 32-bit chunks, but libmtd sometimes allocates
strings without that much padding. This patch adds something extra to
a string allocation so that the mtd ioengine is clean with respect
to valgrind memory access checks.
Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Thu, 16 Apr 2015 03:47:47 +0000 (21:47 -0600)]
Fix wrong index bug
Commit
0e4dd95c548cc re-uses 'i' as an iterator, causing us to
overrun the nr_ts allocated. This subsequently causes fio to
segfault.
Fixes:
0e4dd95c548cc
Signed-off-by: Jens Axboe <axboe@fb.com>
Jens Axboe [Wed, 15 Apr 2015 16:01:56 +0000 (10:01 -0600)]
Add sample job file for fixed submission rate
Signed-off-by: Jens Axboe <axboe@fb.com>