fio.git
13 years agomutex error handling
Jens Axboe [Thu, 8 Mar 2007 19:29:11 +0000 (20:29 +0100)]
mutex error handling

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd mutex object file to other Makefile's
Jens Axboe [Thu, 8 Mar 2007 19:27:21 +0000 (20:27 +0100)]
Add mutex object file to other Makefile's

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd a real semaphore implemtation
Jens Axboe [Thu, 8 Mar 2007 19:25:46 +0000 (20:25 +0100)]
Add a real semaphore implemtation

I've seen races where job N+1 got started before N, this breaks
for dependent jobs. So give up and implement a real semaphore
in mmap'ed shared storage.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoUse DDIR_WRITE symbolic value instead of a hard coded 2
Jens Axboe [Thu, 8 Mar 2007 18:09:49 +0000 (19:09 +0100)]
Use DDIR_WRITE symbolic value instead of a hard coded 2

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoA few more stat fixes and cleanups
Jens Axboe [Thu, 8 Mar 2007 14:35:11 +0000 (15:35 +0100)]
A few more stat fixes and cleanups

Mostly cleanups, but also one group status index that was
hardcoded as READ when it should be 'i' for either read or write.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFixup reporting for !runtime data directions
Jens Axboe [Thu, 8 Mar 2007 14:28:10 +0000 (15:28 +0100)]
Fixup reporting for !runtime data directions

Got broken with the group reporting, the minimum time and bw
should only be accounted for data directions where actual
work has happened. Otherwise they are pretty much guarenteed
to be 0.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoGet rid of reopen_files()
Jens Axboe [Thu, 8 Mar 2007 13:29:03 +0000 (14:29 +0100)]
Get rid of reopen_files()

Move the full file state clear into td_io_open_file(), so a
reopen is a plain close/open of that file.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agonull engine: don't dup() stdin anymore
Jens Axboe [Thu, 8 Mar 2007 13:09:59 +0000 (14:09 +0100)]
null engine: don't dup() stdin anymore

We can now track fd independently of ->fd, so don't open
a file we don't have to use.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd ->open to struct fio_file
Jens Axboe [Thu, 8 Mar 2007 13:09:18 +0000 (14:09 +0100)]
Add ->open to struct fio_file

Don't use ->fd == -1 to check for the file being open or not,
an io engine could be non-fd based.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoget_next_offset() number of loops change
Jens Axboe [Thu, 8 Mar 2007 13:02:42 +0000 (14:02 +0100)]
get_next_offset() number of loops change

Commit b5af82930ccfd7dda6a1b11794efb452eb76d8dc inadvertently
changed this, revert.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agofile_service_type=random fix
Jens Axboe [Thu, 8 Mar 2007 12:33:36 +0000 (13:33 +0100)]
file_service_type=random fix

It generated 0..n-1, where we wanted 0..n.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoEngines should not touch nr_open_files anymore
Jens Axboe [Thu, 8 Mar 2007 12:23:10 +0000 (13:23 +0100)]
Engines should not touch nr_open_files anymore

Leftover fix, should have been included with the ->open_file()
addition.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoopenfiles fix
Jens Axboe [Thu, 8 Mar 2007 12:08:24 +0000 (13:08 +0100)]
openfiles fix

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix invalidate cache typo
Jens Axboe [Thu, 8 Mar 2007 11:49:37 +0000 (12:49 +0100)]
Fix invalidate cache typo

The odirect check was reversed.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoRevamp file open/close handling
Jens Axboe [Thu, 8 Mar 2007 11:43:13 +0000 (12:43 +0100)]
Revamp file open/close handling

Some IO engines need special handling for opening and closing
files, and this has complicated the fio filesetup.c file. Instead
have the io engine provide hooks for file open/close. This also
greatly cleans up the flags (we can get rid of SELFOPEN and MMAPIO)
and moves private knowledge into the engines where it belongs.

This potentially destabilizes fio somewhat, so testing is needed.
The new openfiles option that is introduced with this change isn't
verified working yet, hence it isn't documented.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMove description text
Jens Axboe [Tue, 6 Mar 2007 19:01:13 +0000 (20:01 +0100)]
Move description text

It was dangling at the bottom.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoTerse output change
Jens Axboe [Tue, 6 Mar 2007 18:50:58 +0000 (19:50 +0100)]
Terse output change

- Missing a comma.
- Change comma to semicolon, less confusion over floating point numbers.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoShow how many jobs are in a group
Jens Axboe [Tue, 6 Mar 2007 18:46:09 +0000 (19:46 +0100)]
Show how many jobs are in a group

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoUpdate terse output
Jens Axboe [Tue, 6 Mar 2007 16:05:32 +0000 (17:05 +0100)]
Update terse output

Several additions to the verbose output have been added since the
terse format was introduced, update it to match.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDefault to using gettimeofday()
Jens Axboe [Tue, 6 Mar 2007 15:53:26 +0000 (16:53 +0100)]
Default to using gettimeofday()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agostat.c: Superflous n
Jens Axboe [Tue, 6 Mar 2007 14:48:38 +0000 (15:48 +0100)]
stat.c: Superflous n

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoBe sure to pick up any group error with group_reporting
Jens Axboe [Tue, 6 Mar 2007 14:46:33 +0000 (15:46 +0100)]
Be sure to pick up any group error with group_reporting

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDocument the 'group_reporting' option
Jens Axboe [Tue, 6 Mar 2007 14:40:49 +0000 (15:40 +0100)]
Document the 'group_reporting' option

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoStat summation fixup
Jens Axboe [Tue, 6 Mar 2007 14:37:00 +0000 (15:37 +0100)]
Stat summation fixup

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agotd vs ts typo
Jens Axboe [Tue, 6 Mar 2007 14:32:33 +0000 (15:32 +0100)]
td vs ts typo

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd group reporting
Jens Axboe [Tue, 6 Mar 2007 14:19:24 +0000 (15:19 +0100)]
Add group reporting

Still needs some testing, so the option isn't documented yet. The
standard deviation averaging also isn't mathematically sound.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoOne step closer to group reporting
Jens Axboe [Tue, 6 Mar 2007 11:43:03 +0000 (12:43 +0100)]
One step closer to group reporting

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDon't kill() running threads
Jens Axboe [Mon, 5 Mar 2007 19:18:31 +0000 (20:18 +0100)]
Don't kill() running threads

Just let them exit nicely.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMerge branch 'master' of ssh://brick.kernel.dk/data/git/fio
Jens Axboe [Mon, 5 Mar 2007 18:23:19 +0000 (19:23 +0100)]
Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio

13 years agoCleanup requeue handling
Jens Axboe [Mon, 5 Mar 2007 17:33:22 +0000 (18:33 +0100)]
Cleanup requeue handling

Clear ->resid automatically, and get rid of the goto construct.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoInclude location for RH related distros.
Jens Axboe [Mon, 5 Mar 2007 11:37:54 +0000 (12:37 +0100)]
Include location for RH related distros.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoForced kill is not used anymore.
Jens Axboe [Mon, 5 Mar 2007 11:35:29 +0000 (12:35 +0100)]
Forced kill is not used anymore.

So remove the parameter from terminate_thread()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoGently prod children with a SIGQUIT on terminate
Jens Axboe [Mon, 5 Mar 2007 11:32:32 +0000 (12:32 +0100)]
Gently prod children with a SIGQUIT on terminate

This should unstuck most loops.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoImprove error logging and handling
Jens Axboe [Mon, 5 Mar 2007 09:06:06 +0000 (10:06 +0100)]
Improve error logging and handling

If we see an IO anomaly, make sure we dump as much info about the
filename, size, offset, etc.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFio 1.13 fio-1.13
Jens Axboe [Sat, 3 Mar 2007 11:21:34 +0000 (12:21 +0100)]
Fio 1.13

A few silly bugs in the 1.12 release, since it was a bigger change
from 1.11. So do a 1.13 maintenance release.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agofio.h: Fix TD_DDIR_RANDWRITE
Joel Becker [Sat, 3 Mar 2007 11:03:29 +0000 (12:03 +0100)]
fio.h: Fix TD_DDIR_RANDWRITE

A typeo had set DDIR_RANDWRITE to be "WRITE | READ" instead of
"WRITE | RAND".  Correct it.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMerge branch 'master' of ssh://brick.kernel.dk/data/git/fio
Jens Axboe [Fri, 2 Mar 2007 20:43:30 +0000 (21:43 +0100)]
Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio

13 years agoSpelling fixes
Jens Axboe [Fri, 2 Mar 2007 20:43:25 +0000 (21:43 +0100)]
Spelling fixes

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMerge branch 'master' of ssh://router/data/git/fio
Jens Axboe [Fri, 2 Mar 2007 20:23:12 +0000 (21:23 +0100)]
Merge branch 'master' of ssh://router/data/git/fio

13 years agofio.h: Grow td->verror
Joel Becker [Fri, 2 Mar 2007 20:23:00 +0000 (21:23 +0100)]
fio.h: Grow td->verror

td->verror was 80 bytes.  This truncates some error messages when the
filename or function name is long.  Grow it to a round 128B.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoposixaio engine: residual data count
Jens Axboe [Fri, 2 Mar 2007 18:42:37 +0000 (19:42 +0100)]
posixaio engine: residual data count

If the io was cancelled, residual is the full data buffer length.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoio_u completion error propagation
Jens Axboe [Fri, 2 Mar 2007 14:16:45 +0000 (15:16 +0100)]
io_u completion error propagation

Make sure we definitely signal an endio error.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agolibaio engine: proper return value checking
Jens Axboe [Fri, 2 Mar 2007 14:16:03 +0000 (15:16 +0100)]
libaio engine: proper return value checking

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd example network io job file
Jens Axboe [Fri, 2 Mar 2007 07:58:05 +0000 (08:58 +0100)]
Add example network io job file

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoNet engine: move connection setup into ->init()
Jens Axboe [Fri, 2 Mar 2007 07:55:48 +0000 (08:55 +0100)]
Net engine: move connection setup into ->init()

Then it happens in the process own context, which means we can
define full send/receive jobs in a single job file and run them
from a single fio instance.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoNet engine: missing ->nr_open_files for clients
Jens Axboe [Fri, 2 Mar 2007 07:47:18 +0000 (08:47 +0100)]
Net engine: missing ->nr_open_files for clients

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoConvert null io engine to use ->setup()
Jens Axboe [Fri, 2 Mar 2007 07:44:25 +0000 (08:44 +0100)]
Convert null io engine to use ->setup()

Then we can get rid of the NULLIO flags hack

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoNet engine: need to set ->nr_open_files
Jens Axboe [Fri, 2 Mar 2007 07:00:23 +0000 (08:00 +0100)]
Net engine: need to set ->nr_open_files

It is marked as SELFOPEN, so it opens it's own files. So it also
needs to increment the open file count as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAccept -foo as well as --foo for options
Jens Axboe [Thu, 1 Mar 2007 13:23:28 +0000 (14:23 +0100)]
Accept -foo as well as --foo for options

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoImprove friendliness of --cmdhelp
Jens Axboe [Thu, 1 Mar 2007 13:05:30 +0000 (14:05 +0100)]
Improve friendliness of --cmdhelp

If no match is found, print the closest. Quite handy when
you can't quite remember the exact option name.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDon't require 'all' argument to --cmdhelp to dump all options
Jens Axboe [Thu, 1 Mar 2007 09:44:12 +0000 (10:44 +0100)]
Don't require 'all' argument to --cmdhelp to dump all options

If an argument isn't given, just dump all commands. This has the
downside that one MUST use --cmdhelp=option to get option help,
where as before --cmdhelp option worked as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDocument file_service_type option
Jens Axboe [Thu, 1 Mar 2007 09:06:10 +0000 (10:06 +0100)]
Document file_service_type option

It's now tested, so add it to the list of options in HOWTO.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix for file_service_type=random
Jens Axboe [Thu, 1 Mar 2007 09:04:15 +0000 (10:04 +0100)]
Fix for file_service_type=random

We need to retrieve a new random offset if the file is closed,
obviously.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoBetter management of open files
Jens Axboe [Thu, 1 Mar 2007 08:54:57 +0000 (09:54 +0100)]
Better management of open files

This is a first step to properly supporting dynamic open/close of
new files, differently sized files, etc.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoExcessive passing around of struct fio_file
Jens Axboe [Thu, 1 Mar 2007 08:33:57 +0000 (09:33 +0100)]
Excessive passing around of struct fio_file

It's already set before calling fill_io_u(), no point in passing
it around and overwriting it with the same value later.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoOnly check FIO_DISKLESSIO in stat.c
Jens Axboe [Thu, 1 Mar 2007 07:27:42 +0000 (08:27 +0100)]
Only check FIO_DISKLESSIO in stat.c

Just make the null engine set that flag as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years ago[PATCH] ioengine flags: Replace FIO_NETIO with real flags that map the
Joel Becker [Thu, 1 Mar 2007 07:26:38 +0000 (08:26 +0100)]
[PATCH] ioengine flags: Replace FIO_NETIO with real flags that map the
behavior

The FIO_NETIO ioengine flag created two behaviors.  First, open_files()
would not open any files - this was handled in engines/net:setup().
Second, init_disk_util() would ignore the files and not try to locate
their disk.

Other engines might want one of these behaviors but not the other.  If
an engine opens its own files, it doesn't want open_files() to do anything,
even if the files are eventually disk-based.  An engine might want to
prevent init_disk_util() from running.

The FIO_NETIO flag is split into two flags.

FIO_SELFOPEN states that the engine will do its own open(), whether it
is a real open(2) or something internal to the engine.

FIO_DISKLESSIO states that init_disk_util() is should not be run.  fio
should treat the engine's files as if they are not part of a disk.

Finally, engines/net.c is changed to use these two flags.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years ago[PATCH] init.c: Expose f_out and f_err to loaded libraries via dlsym()
Joel Becker [Thu, 1 Mar 2007 07:24:39 +0000 (08:24 +0100)]
[PATCH] init.c: Expose f_out and f_err to loaded libraries via dlsym()

Loaded ioengines would like to use the logging functions but can't, as
they can't see f_out and f_err.  Create get_f_{out,err}() so that
the libraries can dlsym() them.  Compile fio with -rdynamic so dlopen()
works.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years ago[PATCH] parse.c: Make FIO_OPT_STR explicitly one value
Joel Becker [Thu, 1 Mar 2007 07:22:42 +0000 (08:22 +0100)]
[PATCH] parse.c: Make FIO_OPT_STR explicitly one value

The original change had __handle_option() check !first to avoid
parsing an FIO_OPT_STR a second time.  However, the caller handle_option()
has a more explicit check.  Excluding FIO_OPT_STR there is much cleaner.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDon't do rate checks, if no ratemin has been specified.
Jens Axboe [Wed, 28 Feb 2007 10:13:49 +0000 (11:13 +0100)]
Don't do rate checks, if no ratemin has been specified.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDocument loading external io engines
Jens Axboe [Wed, 28 Feb 2007 10:12:25 +0000 (11:12 +0100)]
Document loading external io engines

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoPrefix external io engine loading with 'external'
Joel Becker [Wed, 28 Feb 2007 10:10:58 +0000 (11:10 +0100)]
Prefix external io engine loading with 'external'

This is needed because the parser checks the allowed values now,
which broke ioengine=/some/external/file.o for loading an
external engine.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix parser bug
Joel Becker [Wed, 28 Feb 2007 08:38:39 +0000 (09:38 +0100)]
Fix parser bug

If the option parser sees a ':', it automatically assumes that
you meant a range.  It will then try to parse the second half of the
option.  This isn't just my external: option, it happens to mem: as
well.  That is:

    1) Option mem=mmaphuge:/dev/shm/foo
    2) handle_option() notices the ':' and stores off ptr2.
    3) __handle_option() corectly sees the option "mem" and maps
       "mmaphuge" to MEM_MMAPHUGE.  It then calls str_mem_cb(), which
       stores off the "/dev/shm/foo" after the ':'.  Still working
       great.
    4) Control returns to handle_option(), which sees that ptr2 is
       non-NULL.  It calls __handle_option() again, pointing to the
       string after the ':'.
    5) __handle_option() prints an error, as "/dev/shm/foo" is not a
       known option.

Fix it by breaking out early for the 2nd parse round if the option
type is a string.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDuplicate name checks in ioengines.c
Jens Axboe [Wed, 28 Feb 2007 08:32:54 +0000 (09:32 +0100)]
Duplicate name checks in ioengines.c

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agosyslet: x86_64 support
Jens Axboe [Wed, 28 Feb 2007 07:57:27 +0000 (08:57 +0100)]
syslet: x86_64 support

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoStyle fixup
Jens Axboe [Wed, 28 Feb 2007 07:56:12 +0000 (08:56 +0100)]
Style fixup

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMove syslet check into the arch header, where it belongs
Jens Axboe [Wed, 28 Feb 2007 07:54:37 +0000 (08:54 +0100)]
Move syslet check into the arch header, where it belongs

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFio version 1.12 fio-1.12
Jens Axboe [Tue, 27 Feb 2007 19:38:51 +0000 (20:38 +0100)]
Fio version 1.12

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoTemporary iodepth_low work-around for syslets
Jens Axboe [Tue, 27 Feb 2007 18:56:43 +0000 (19:56 +0100)]
Temporary iodepth_low work-around for syslets

syslet really wants iodepth_low=1 for sequential workloads,
otherwise when fio starts issuing a new sequence of io, we'll
have pending-and-unsubmitted requests from the previous process.
The results is seeky instead of sequential requests.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agosyslet engine: submission latency numbers
Jens Axboe [Tue, 27 Feb 2007 18:47:13 +0000 (19:47 +0100)]
syslet engine: submission latency numbers

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMove the iodepth_batch into td_io_queue() instead
Jens Axboe [Mon, 26 Feb 2007 13:45:12 +0000 (14:45 +0100)]
Move the iodepth_batch into td_io_queue() instead

The previous part in do_io() introduced a bug (overwriting ret),
and we really need to do it from other locations as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoExtend option name from 16 to 20 bytes
Jens Axboe [Mon, 26 Feb 2007 12:18:47 +0000 (13:18 +0100)]
Extend option name from 16 to 20 bytes

The file_service_type was too long, making the output look
badly formatted.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMerge branch 'master' of ssh://brick.kernel.dk/data/git/fio
Jens Axboe [Mon, 26 Feb 2007 11:57:32 +0000 (12:57 +0100)]
Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio

13 years agoAdd iodepth_batch setting
Jens Axboe [Mon, 26 Feb 2007 11:57:09 +0000 (12:57 +0100)]
Add iodepth_batch setting

This allows controlling how much IO we submit in one go
independent of the iodepth set.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMerge branch 'master' of ssh://git.kernel.dk/data/git/fio
Jens Axboe [Mon, 26 Feb 2007 11:52:57 +0000 (12:52 +0100)]
Merge branch 'master' of ssh://git.kernel.dk/data/git/fio

13 years agoDo proper wait for pending IO on clean exit
Jens Axboe [Mon, 26 Feb 2007 11:43:42 +0000 (12:43 +0100)]
Do proper wait for pending IO on clean exit

Only do the cancel if something went wrong and td->error is set,
otherwise be a good citizen and complete and account for the io
we submitted.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoNo need to do fadvise() on O_DIRECT/raw IO
Jens Axboe [Mon, 26 Feb 2007 11:33:27 +0000 (12:33 +0100)]
No need to do fadvise() on O_DIRECT/raw IO

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoSpeedup init_disk_util() when dealing with many jobs
Jens Axboe [Mon, 26 Feb 2007 11:28:58 +0000 (12:28 +0100)]
Speedup init_disk_util() when dealing with many jobs

sysfs lookups can take quite a while, so check against last device
to avoid having to iterate through sysfs again.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agosyslet engine: smart batching
Jens Axboe [Mon, 26 Feb 2007 09:44:22 +0000 (10:44 +0100)]
syslet engine: smart batching

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMove ->commit() call to td_io_getevents()
Jens Axboe [Mon, 26 Feb 2007 09:40:03 +0000 (10:40 +0100)]
Move ->commit() call to td_io_getevents()

If we need to complete some events (min > 0), make sure we
have committed a pending batch.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agosyslet v4 support
Jens Axboe [Mon, 26 Feb 2007 09:22:31 +0000 (10:22 +0100)]
syslet v4 support

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoRequeue io_u flags fix
Jens Axboe [Sat, 24 Feb 2007 12:31:57 +0000 (13:31 +0100)]
Requeue io_u flags fix

We need to clear IO_U_F_FLIGHT and set IO_U_F_FREE in requeue.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFirst cut at doing sequences of atoms in one commit
Jens Axboe [Fri, 23 Feb 2007 12:21:45 +0000 (13:21 +0100)]
First cut at doing sequences of atoms in one commit

Needs error handling and stop conditions, so it's in an experimental
branch for now.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMove completion handler into the io_u
Jens Axboe [Fri, 23 Feb 2007 11:34:57 +0000 (12:34 +0100)]
Move completion handler into the io_u

This is needed for completions that happen outside of fio,
or more specifically, for syslet to enable completions in
a ->queue() hook combined with ->commit().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDon't include engines we don't have
Jens Axboe [Fri, 23 Feb 2007 10:23:03 +0000 (11:23 +0100)]
Don't include engines we don't have

With the new option scheme, it's easier to just diff out the option
types we don't support. So do that for the io engines.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoIO engine callback need not dump possible values
Jens Axboe [Fri, 23 Feb 2007 10:18:30 +0000 (11:18 +0100)]
IO engine callback need not dump possible values

The parser will do this now. Also don't dump the worthless
"job dropped" message.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoRate must always calculate bytes done
Jens Axboe [Fri, 23 Feb 2007 09:56:22 +0000 (10:56 +0100)]
Rate must always calculate bytes done

Otherwise rate will never be checked.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoImprove rate usec calculation
Jens Axboe [Fri, 23 Feb 2007 09:47:46 +0000 (10:47 +0100)]
Improve rate usec calculation

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoMove handling of possible values into the option parser
Jens Axboe [Fri, 23 Feb 2007 09:29:16 +0000 (10:29 +0100)]
Move handling of possible values into the option parser

Eliminates the need for a callback for any FIO_OPT_STR type
option, unless it needs to do something there other than just
setting the variable.

The possible options are not in an array of value pairs, so we
can easily match an string option with an integer output value.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoStreamline thread_data data direction setting and checking
Jens Axboe [Fri, 23 Feb 2007 08:26:09 +0000 (09:26 +0100)]
Streamline thread_data data direction setting and checking

Currently it's a mess of ->ddir, ->iomix and ->sequential. Add
a TD_DDIR_* for each of these, so we can store them as one value.

A prerequisite for the next parsing cleanup.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd option to select how to service multiple files
Jens Axboe [Fri, 23 Feb 2007 07:45:55 +0000 (08:45 +0100)]
Add option to select how to service multiple files

Right now we just round robin the open files, but sometimes you
just want to randomly go through the files. Add a 'file_service'
option for that, default to round robin still.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDump io_u on timeout
Jens Axboe [Thu, 22 Feb 2007 19:33:01 +0000 (20:33 +0100)]
Dump io_u on timeout

It's still disabled, though.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoCorrect spelling error
Jens Axboe [Thu, 22 Feb 2007 18:37:53 +0000 (19:37 +0100)]
Correct spelling error

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoAdd more context to the error messages
Jens Axboe [Thu, 22 Feb 2007 18:36:48 +0000 (19:36 +0100)]
Add more context to the error messages

Errors like:

fio: pid=0, err=22/file:filesetup.c:380, error=Invalid argument

do not give a lot of clue as to what is wrong, unless you
have a matching source. So add a context relevant info
message as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoList syslet-rw as a supported option in the ioengine help dump
Jens Axboe [Thu, 22 Feb 2007 13:08:36 +0000 (14:08 +0100)]
List syslet-rw as a supported option in the ioengine help dump

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agosyslet: syscall still needs void * cast
Jens Axboe [Thu, 22 Feb 2007 13:08:13 +0000 (14:08 +0100)]
syslet: syscall still needs void * cast

It avoids the long -> structure pointer cast warning.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoDon't check st_size for special files
Jens Axboe [Thu, 22 Feb 2007 13:07:39 +0000 (14:07 +0100)]
Don't check st_size for special files

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agosyslet: typo
Jens Axboe [Thu, 22 Feb 2007 12:49:36 +0000 (13:49 +0100)]
syslet: typo

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFurther improve thread handling
Jens Axboe [Thu, 22 Feb 2007 11:26:57 +0000 (12:26 +0100)]
Further improve thread handling

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
13 years agoFix crash on thread exit
Jens Axboe [Thu, 22 Feb 2007 11:26:20 +0000 (12:26 +0100)]
Fix crash on thread exit

If we had multiple threads, we could corrupt the heap by
freeing memory we did not alloc.

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