fio.git
12 years agoStyle fixup
Jens Axboe [Tue, 4 Oct 2011 08:34:03 +0000 (10:34 +0200)]
Style fixup

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: fix for non zero appended strings
Jens Axboe [Tue, 4 Oct 2011 08:31:53 +0000 (10:31 +0200)]
server: fix for non zero appended strings

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoparser: use logging infrastructure
Jens Axboe [Tue, 4 Oct 2011 08:31:10 +0000 (10:31 +0200)]
parser: use logging infrastructure

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: idle loop support
Jens Axboe [Tue, 4 Oct 2011 07:18:30 +0000 (09:18 +0200)]
server: idle loop support

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoclient: probe command support
Jens Axboe [Tue, 4 Oct 2011 07:00:40 +0000 (09:00 +0200)]
client: probe command support

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: error handling and probe command
Jens Axboe [Tue, 4 Oct 2011 06:57:39 +0000 (08:57 +0200)]
server: error handling and probe command

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoclient: handle connection failure
Jens Axboe [Tue, 4 Oct 2011 06:31:40 +0000 (08:31 +0200)]
client: handle connection failure

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: silence mem debug warning
Jens Axboe [Mon, 3 Oct 2011 19:47:27 +0000 (21:47 +0200)]
server: silence mem debug warning

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: remove some debug statements
Jens Axboe [Mon, 3 Oct 2011 19:10:17 +0000 (21:10 +0200)]
server: remove some debug statements

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agopoll: break on EINTR without complaining
Jens Axboe [Mon, 3 Oct 2011 19:09:14 +0000 (21:09 +0200)]
poll: break on EINTR without complaining

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: fix typos in conversion
Jens Axboe [Mon, 3 Oct 2011 19:08:48 +0000 (21:08 +0200)]
server: fix typos in conversion

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: attempt to handle client ctrl-c
Jens Axboe [Mon, 3 Oct 2011 18:53:32 +0000 (20:53 +0200)]
server: attempt to handle client ctrl-c

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: send network copy of run_str[]
Jens Axboe [Mon, 3 Oct 2011 17:44:41 +0000 (19:44 +0200)]
server: send network copy of run_str[]

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: add ETA as a specific command
Jens Axboe [Mon, 3 Oct 2011 14:48:30 +0000 (16:48 +0200)]
server: add ETA as a specific command

No more text passing for ETA.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoAbstract out calculation of ETA from display of ETA
Jens Axboe [Mon, 3 Oct 2011 14:03:43 +0000 (16:03 +0200)]
Abstract out calculation of ETA from display of ETA

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoAdd TODO list
Jens Axboe [Mon, 3 Oct 2011 13:25:49 +0000 (15:25 +0200)]
Add TODO list

Not complete

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: package defrag fix
Jens Axboe [Mon, 3 Oct 2011 13:03:08 +0000 (15:03 +0200)]
server: package defrag fix

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoAdd type checking to 16/32/64 endianness converters
Jens Axboe [Mon, 3 Oct 2011 12:45:27 +0000 (14:45 +0200)]
Add type checking to 16/32/64 endianness converters

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoclient: fixup quit
Jens Axboe [Mon, 3 Oct 2011 12:24:03 +0000 (14:24 +0200)]
client: fixup quit

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: transmit status as structures, not text
Jens Axboe [Mon, 3 Oct 2011 12:20:01 +0000 (14:20 +0200)]
server: transmit status as structures, not text

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoAllocate thread_stat name arrays statically
Jens Axboe [Mon, 3 Oct 2011 10:21:25 +0000 (12:21 +0200)]
Allocate thread_stat name arrays statically

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoMove getrusage() out of thread_stat
Jens Axboe [Mon, 3 Oct 2011 10:14:19 +0000 (12:14 +0200)]
Move getrusage() out of thread_stat

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoMove stat_io_bytes/time to thread_data
Jens Axboe [Mon, 3 Oct 2011 10:12:03 +0000 (12:12 +0200)]
Move stat_io_bytes/time to thread_data

Anything that isn't needed to sum/show thread stats should not be
in struct thread_stat.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: unify shm setup
Jens Axboe [Mon, 3 Oct 2011 10:01:42 +0000 (12:01 +0200)]
server: unify shm setup

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: endianness bug and exit command
Jens Axboe [Mon, 3 Oct 2011 09:48:39 +0000 (11:48 +0200)]
server: endianness bug and exit command

- flags should be converted to network native format
- add separate EXIT command for server, regular job completion should
  not quit it

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoclient: don't setup shared mem area for just the frontend
Jens Axboe [Mon, 3 Oct 2011 09:48:17 +0000 (11:48 +0200)]
client: don't setup shared mem area for just the frontend

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: start conversion of data structures to network friendly types
Jens Axboe [Mon, 3 Oct 2011 08:06:44 +0000 (10:06 +0200)]
server: start conversion of data structures to network friendly types

Not done yet, but do the basic conversion.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: initial support for daemonizing
Jens Axboe [Mon, 3 Oct 2011 07:11:02 +0000 (09:11 +0200)]
server: initial support for daemonizing

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: make struct group_run_stats network transfer friendly
Jens Axboe [Sun, 2 Oct 2011 07:06:14 +0000 (03:06 -0400)]
server: make struct group_run_stats network transfer friendly

Use explicitly sized types.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoStyle fixup
Jens Axboe [Sun, 2 Oct 2011 07:02:03 +0000 (03:02 -0400)]
Style fixup

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: malloc/free fix
Jens Axboe [Sat, 1 Oct 2011 20:26:42 +0000 (16:26 -0400)]
server: malloc/free fix

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoFixup some bad file naming
Jens Axboe [Sat, 1 Oct 2011 19:01:08 +0000 (15:01 -0400)]
Fixup some bad file naming

log.c does not match log.h. Rename the iolog stuff to iolog.c
and infolog.c to log.c (so it matches the include).

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver/client: add FD_NET debug clues
Jens Axboe [Sat, 1 Oct 2011 18:50:51 +0000 (12:50 -0600)]
server/client: add FD_NET debug clues

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoAdd FD_NET debugging value
Jens Axboe [Sat, 1 Oct 2011 18:42:00 +0000 (12:42 -0600)]
Add FD_NET debugging value

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoclient: re-setup poll fd array in case a client disappears
Jens Axboe [Sat, 1 Oct 2011 18:40:32 +0000 (12:40 -0600)]
client: re-setup poll fd array in case a client disappears

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: exit gracefully on ctrl-c
Jens Axboe [Sat, 1 Oct 2011 18:36:32 +0000 (12:36 -0600)]
server: exit gracefully on ctrl-c

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoclient: continue support for multiple connections
Jens Axboe [Sat, 1 Oct 2011 18:24:21 +0000 (12:24 -0600)]
client: continue support for multiple connections

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoclient: initial support for multiple connections
Jens Axboe [Sat, 1 Oct 2011 17:11:35 +0000 (11:11 -0600)]
client: initial support for multiple connections

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: ensure payload larger than max is broken into pieces
Jens Axboe [Sat, 1 Oct 2011 14:48:50 +0000 (08:48 -0600)]
server: ensure payload larger than max is broken into pieces

For debug purposes, set the max payload size to 64 to catch any
further issues while developing this.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: quit client when job run is complete
Jens Axboe [Sat, 1 Oct 2011 14:31:30 +0000 (08:31 -0600)]
server: quit client when job run is complete

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoclient: fix error in logging output
Jens Axboe [Sat, 1 Oct 2011 06:08:39 +0000 (00:08 -0600)]
client: fix error in logging output

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: serial is a 64-bit field
Jens Axboe [Sat, 1 Oct 2011 04:58:13 +0000 (22:58 -0600)]
server: serial is a 64-bit field

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: switch to 16-bit crc
Jens Axboe [Sat, 1 Oct 2011 04:50:39 +0000 (22:50 -0600)]
server: switch to 16-bit crc

Good enough and we can kill the command padding

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoReinstate double logging if f_err != stderr
Jens Axboe [Sat, 1 Oct 2011 04:50:16 +0000 (22:50 -0600)]
Reinstate double logging if f_err != stderr

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agocrc16: use void * as the argument
Jens Axboe [Sat, 1 Oct 2011 04:49:30 +0000 (22:49 -0600)]
crc16: use void * as the argument

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoserver: debug fixes
Jens Axboe [Sat, 1 Oct 2011 04:29:08 +0000 (22:29 -0600)]
server: debug fixes

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoPass more arguments to fio_init_net_cmd()
Jens Axboe [Sat, 1 Oct 2011 04:24:17 +0000 (22:24 -0600)]
Pass more arguments to fio_init_net_cmd()

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoUse length guarded sprintf functions
Jens Axboe [Sat, 1 Oct 2011 04:20:37 +0000 (22:20 -0600)]
Use length guarded sprintf functions

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoServer logging cleanup/functionality
Jens Axboe [Fri, 30 Sep 2011 23:35:45 +0000 (17:35 -0600)]
Server logging cleanup/functionality

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoStart of functional client
Jens Axboe [Fri, 30 Sep 2011 23:00:42 +0000 (17:00 -0600)]
Start of functional client

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoAdd start of client, start of real protocol
Jens Axboe [Fri, 30 Sep 2011 21:01:32 +0000 (15:01 -0600)]
Add start of client, start of real protocol

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoProperly log errors in server
Jens Axboe [Fri, 30 Sep 2011 00:38:08 +0000 (18:38 -0600)]
Properly log errors in server

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoClose listen socket when done
Jens Axboe [Fri, 30 Sep 2011 00:28:46 +0000 (18:28 -0600)]
Close listen socket when done

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoUse poll() for connect loop
Jens Axboe [Fri, 30 Sep 2011 00:27:02 +0000 (18:27 -0600)]
Use poll() for connect loop

So we can exit nicely when asked to.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoHide things not appropriate behind is_backend
Jens Axboe [Fri, 30 Sep 2011 00:00:35 +0000 (18:00 -0600)]
Hide things not appropriate behind is_backend

Also add explicit command to exit the server, FIO_QUIT.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoStart of client/server
Jens Axboe [Thu, 29 Sep 2011 23:45:28 +0000 (17:45 -0600)]
Start of client/server

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoInclude http:// git url location
Jens Axboe [Thu, 29 Sep 2011 15:21:49 +0000 (09:21 -0600)]
Include http:// git url location

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoScramble corruption fix
Jens Axboe [Tue, 27 Sep 2011 20:27:48 +0000 (14:27 -0600)]
Scramble corruption fix

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoFix aiocb compile warnings on HPUX
Jens Axboe [Wed, 21 Sep 2011 07:38:01 +0000 (09:38 +0200)]
Fix aiocb compile warnings on HPUX

Unlike other platforms, it seems to require aiocb64 explicitly
for long offsets. Add an os independent typedef for this.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoSilence build warning on HPUX
Jens Axboe [Wed, 21 Sep 2011 07:27:24 +0000 (09:27 +0200)]
Silence build warning on HPUX

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoScramble fix
Jens Axboe [Mon, 19 Sep 2011 09:33:30 +0000 (11:33 +0200)]
Scramble fix

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoAdd option for controlling buffer scrambling
Jens Axboe [Mon, 19 Sep 2011 07:24:44 +0000 (09:24 +0200)]
Add option for controlling buffer scrambling

scramble_buffers bool option, defaults to on.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoScramble on a 512b boundary
Jens Axboe [Fri, 16 Sep 2011 20:45:27 +0000 (22:45 +0200)]
Scramble on a 512b boundary

Instead of just scrambling the full block at the beginning at the
end, make it a bit more clever by:

- Doing it at 512b intervals to ensure full 512b de-dupe attemts, and
- Do it at a "random" offset into that block.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoScramble default write buffer contents slightly
Jens Axboe [Fri, 16 Sep 2011 20:11:23 +0000 (22:11 +0200)]
Scramble default write buffer contents slightly

If we are worried about de-dupe making the output data too easy
to compress, but don't want the full incompressible guarantee
provided by refill_buffers=1 (since it's too costly), then lets
make their life a little harder by filling the offset of the IO
into the beginning of the buffer and the start time at the end
of the buffer. This will effectively default simple de-dupe
or compression attempts, while not doing the costly full buffer
refill.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoFio 1.58 fio-1.58
Jens Axboe [Fri, 16 Sep 2011 06:44:10 +0000 (08:44 +0200)]
Fio 1.58

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoFix sum_stat() bug in group_reporting
Zheng Liu [Fri, 16 Sep 2011 06:20:12 +0000 (08:20 +0200)]
Fix sum_stat() bug in group_reporting

Write samples in io_stat does not be counted with rw=randread, vice versa.
Then, in sum_stat() function, it will cause 0/0 in calculating mean and S,
and 'nan' is printed. So it should return immediately when src->samples is
equal to 0.

the error result is as follows:
  write: io=8328.0KB, bw=1582.7KB/s, iops=395 , runt=  5262msec
    clat (usec): min=58 , max=293353 , avg= -nan, stdev= -nan
     lat (usec): min=59 , max=293353 , avg= -nan, stdev= -nan
    bw (KB/s) : min=   92, max=  804, per=-nan%, avg= -nan, stdev= -nan

the configuration file used:

[global]
direct=1
ioengine=psync
bs=4k
filename=/dev/sdb1
runtime=5
group_reporting
loops=50

[read]
rw=randread
numjobs=8

[write]
rw=randwrite
numjobs=8

CC: Jens Axboe <jaxboe@fusionio.com>
CC: Yu-ju Hong <yjhong@google.com>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoFix inconsistencies in with man page <param>=<value>
Steven Noonan [Wed, 14 Sep 2011 07:21:33 +0000 (09:21 +0200)]
Fix inconsistencies in with man page <param>=<value>

Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 years agoImprove wording on terse Total IO (KB) field
Jens Axboe [Tue, 13 Sep 2011 08:12:12 +0000 (10:12 +0200)]
Improve wording on terse Total IO (KB) field

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoMerge branch 'master' of ssh://router/data/git/fio
Jens Axboe [Mon, 12 Sep 2011 09:30:01 +0000 (11:30 +0200)]
Merge branch 'master' of ssh://router/data/git/fio

12 years agoAdd terse version output format command line parameter
Jens Axboe [Fri, 9 Sep 2011 19:01:37 +0000 (21:01 +0200)]
Add terse version output format command line parameter

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix disk utilization for delayed jobs
Jens Axboe [Thu, 8 Sep 2011 12:30:24 +0000 (14:30 +0200)]
Fix disk utilization for delayed jobs

We initialized it all before starting the jobs, so we would
easily see disk stats that were too low for jobs that ended
up being started later.

Fix this by moving the disk util init right before the jobs
are spawned.

Reported-by: Shrirang Phansalkar <sphansalkar@stec-inc.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoStyle fixup
Jens Axboe [Thu, 8 Sep 2011 11:08:05 +0000 (13:08 +0200)]
Style fixup

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoBetter parser fix
Jens Axboe [Wed, 7 Sep 2011 20:11:00 +0000 (22:11 +0200)]
Better parser fix

The previous one broke all postfixes for ranges, that wasn't
very nice. This one allows the proper postfix and +/- as well,
as long as the latter is seen before a digit.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoRevert "Fix parser bug with ranges"
Jens Axboe [Wed, 7 Sep 2011 20:10:11 +0000 (22:10 +0200)]
Revert "Fix parser bug with ranges"

This reverts commit f20485ad77872d6c5084dead547420386a6ecd5e.

12 years agoFix parser bug with ranges
Jens Axboe [Wed, 7 Sep 2011 19:21:07 +0000 (21:21 +0200)]
Fix parser bug with ranges

The change to allow -/+ for values broke ranges.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoUse r/R/w/W instead of m/M for mixed workloads with 100% reads or writes
Jens Axboe [Thu, 1 Sep 2011 15:58:11 +0000 (09:58 -0600)]
Use r/R/w/W instead of m/M for mixed workloads with 100% reads or writes

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoOnly clear string pointer in parser for sub-value options
Jens Axboe [Wed, 31 Aug 2011 22:45:03 +0000 (16:45 -0600)]
Only clear string pointer in parser for sub-value options

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoEnsure that buffer contents are random across jobs as well
Jens Axboe [Wed, 31 Aug 2011 21:20:15 +0000 (15:20 -0600)]
Ensure that buffer contents are random across jobs as well

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix parser using uninitialized memory
Jens Axboe [Wed, 31 Aug 2011 20:29:22 +0000 (14:29 -0600)]
Fix parser using uninitialized memory

Introduced by e2979754b554d6a48cffa98f41fb59bc045922ac.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd support for backwards holes
Jens Axboe [Wed, 31 Aug 2011 19:14:12 +0000 (13:14 -0600)]
Add support for backwards holes

If you did:

bs=4k
rw=read:-8k

you would essentially rewind by 8k after reading 4k, causing
the read to be sequentially backwards.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoRemove duplicate code in parser
Jens Axboe [Wed, 31 Aug 2011 18:55:27 +0000 (12:55 -0600)]
Remove duplicate code in parser

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix FIO_OPT_STR_STORE without posval
Jens Axboe [Wed, 31 Aug 2011 18:49:49 +0000 (12:49 -0600)]
Fix FIO_OPT_STR_STORE without posval

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd sub-option support (sort-of) and convert libaio_userspace_reap
Jens Axboe [Wed, 31 Aug 2011 02:43:53 +0000 (20:43 -0600)]
Add sub-option support (sort-of) and convert libaio_userspace_reap

You should now use ioengine=libaio:userspace_reap instead of
the separate option.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdding userspace_libaio_reap option
Dan Ehrenberg [Wed, 31 Aug 2011 02:36:15 +0000 (20:36 -0600)]
Adding userspace_libaio_reap option

When a single thread is reading from a libaio io_context_t object
in a non-blocking polling manner (that is, with the minimum number
of events to return being 0), then it is possible to safely read
events directly from user-space, taking advantage of the fact that
the io_context_t object is a pointer to memory with a certain layout.
This patch adds an option, userspace_libaio_reap, which allows
reading events in this manner when the libaio engine is used.

You can observe its effect by setting iodepth_batch_complete=0
and seeing the change in distribution of system/user time based on
whether this new flag is set. If userspace_libaio_reap=1, then
busy polling takes place in userspace, and there is a larger amount of
usr CPU. If userspace_libaio_reap=0 (the default), then there is a
larger amount of sys CPU from the polling in the kernel.

Polling from a queue in this manner is several times faster. In my
testing, it took less than an eighth as much time to execute a
polling operation in user-space than with the io_getevents syscall.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix bad latency reporting for rated IO jobs
Jens Axboe [Tue, 30 Aug 2011 21:34:14 +0000 (15:34 -0600)]
Fix bad latency reporting for rated IO jobs

If we are going to sleep to satisfy a given rate limit, then
ensure that we flush pending IO first. Otherwise they end up
including the sleep time in the calculated completion latencies.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix compile on environment of SuperH
Nobuhiro Iwamatsu [Sat, 27 Aug 2011 21:34:37 +0000 (06:34 +0900)]
Fix compile on environment of SuperH

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd 'null' perf test
Jens Axboe [Thu, 25 Aug 2011 18:20:14 +0000 (20:20 +0200)]
Add 'null' perf test

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoMake SH port work for packagers that don't differentiate between SH4 and SH4A
Jens Axboe [Thu, 25 Aug 2011 12:24:03 +0000 (14:24 +0200)]
Make SH port work for packagers that don't differentiate between SH4 and SH4A

Generic bits done by me, SH specific bits implemented by
Nobuhiro Iwamatsu <iwamatsu@nigauri.org>.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd possibility to make sequential IO "holed"
Jens Axboe [Thu, 25 Aug 2011 07:09:37 +0000 (09:09 +0200)]
Add possibility to make sequential IO "holed"

For sequential IO, it is now possible to add a number of bytes to
be skipped for every block read or written. Using:

bs=8k
rw=read:8k

will first read 0k->8k, then 16k->24k, and so on. This skips 8k
for every 'bs' sized block read. Similar for writes, doing

bs=4k
rw=write:4k

will write 0k->4k, then 8k->12k, etc. End result being that every
other block is written, in a sequential fashion.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoImprove Makefile for t/ test code
Jens Axboe [Tue, 16 Aug 2011 08:01:03 +0000 (10:01 +0200)]
Improve Makefile for t/ test code

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoAdd simple stest smalloc tester
Jens Axboe [Tue, 16 Aug 2011 07:56:27 +0000 (09:56 +0200)]
Add simple stest smalloc tester

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFixup bad style in plat code
Jens Axboe [Tue, 16 Aug 2011 06:43:45 +0000 (08:43 +0200)]
Fixup bad style in plat code

- Comments
- Var declarations in code sections
- Misc style

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agostats: fix io_u_plat out-of-bound accesses (round 2)
Eric Gouriou [Tue, 16 Aug 2011 06:35:43 +0000 (08:35 +0200)]
stats: fix io_u_plat out-of-bound accesses (round 2)

Commit 833491908a1afd67 introduced the ability to report completion
latency percentiles. It also caused a memory corruption when running
with multiple threads due to out of bound accesses in show_run_stats().
The major index of the io_u_plat two-dimensional array is meant
to be DDIR_ value in {DDIR_READ, DDIR_WRITE} (i.e., {0, 1}). The
code in show_run_stats() incorrectly wrote into the array using
a major index with values {0, 1, 2}. Commit 0a0b49007cbce8d1 fixed
the out of bound accesses by increasing the size of the major
dimension of the io_u_plat array from 2 to 3.

This patch reverts the size change from 0a0b49007cbce8d1 in favor
of avoiding the out-of-bound accesses in show_run_stats().

Signed-off-by: Eric Gouriou <egouriou@google.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix bug in smalloc size calculation
Jiri Horky [Mon, 15 Aug 2011 13:18:03 +0000 (15:18 +0200)]
Fix bug in smalloc size calculation

Jiri reports:

I think I found a bug. If the device (file) used in fio has "wrong" size, and is used with "wrong" block size, the fio fails to allocate memory for randommap.
Following conditions must be true, considering just one thread for simplicity:

 1) number of blocks on the device are too big to fill in the default's pool
 2) number of blocks on the device must be "right", so the size of newly allocated pool by smalloc.c:add_pool is exactly as big as requested size (there are some roundings in place, so not every size triggers this error)

When this is true, function smalloc.c:__smalloc_pool fails to use the newly created (exactly big enough) pool, because of this line:

                idx = find_next_zero(pool->bitmap[i], last_idx);

which always returns non-zero value (the minimum returned value is last_idx +1), and so in our case the idx is 1 even though, the block number 0 is free. As the direct consequence, the function doesn't find enough free space in the given pool and returns NULL pointer. This leads to another try to allocate enough memory in smalloc.c:smalloc_real function, and so on...

The behavior could be reprocuded using both stable 1.57 and git version of the tool. The values that triggers the error are:
init_random_map - real_file_size: 21999995584512, o.rw_min_bs: 4096, blocks: 5371092672, num_maps: 83923323, alloc size: 671386584

whereas this block device is fine:
init_random_map - real_file_size: 19999995985920, o.rw_min_bs: 4096, blocks: 4882811520, num_maps: 76293930, alloc size: 610351440

the configuration file used:

[global]
description=CESNET_test
[cesnet]
filename=/dev/sdd
rw=randread
size=10000g
ioengine=libaio
iodepth=4
bs=4k
runtime=10m
time_based
numjobs=1
group_reporting

Get rid of the +1, it looks like a remnant from when the pools
had a header associated with them.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoRDMA engine: Change wording of HOWTO section
Bart Van Assche [Mon, 15 Aug 2011 07:01:05 +0000 (09:01 +0200)]
RDMA engine: Change wording of HOWTO section

Change "iWarp" into "iWARP" ("iWarp" is the name of a supercomputer) and
"engines" into "protocols".

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Cc: Ren Yufei <renyufei83@yahoo.com.cn>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoFix off-by-one in io_u_plat[] array sizing
Jens Axboe [Mon, 15 Aug 2011 07:00:28 +0000 (09:00 +0200)]
Fix off-by-one in io_u_plat[] array sizing

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agostats: Add a function to report completion latency percentiles
Yu-ju Hong [Fri, 12 Aug 2011 22:53:44 +0000 (00:53 +0200)]
stats: Add a function to report completion latency percentiles

    This patch introduces two new options:
    1) Specifying --clat_percentiles enables the reporting of
       completion latency percentiles.
    2) --percentile_list allows the user to customize the
       list of percentiles to report.

Signed-off-by: Yu-ju Hong <yjhong@google.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoman page typo
Jens Axboe [Mon, 8 Aug 2011 07:47:13 +0000 (09:47 +0200)]
man page typo

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoUpdate softrandommap in HOWTO
Jens Axboe [Mon, 8 Aug 2011 07:07:28 +0000 (09:07 +0200)]
Update softrandommap in HOWTO

Previous commit fixed the typo in the man page, update the HOWTO
as well.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
12 years agoMerge branch 'master' of ssh://router/data/git/fio
Jens Axboe [Mon, 8 Aug 2011 07:06:45 +0000 (09:06 +0200)]
Merge branch 'master' of ssh://router/data/git/fio