fio.git
12 years agopointer -> int conversion warning
Jens Axboe [Mon, 12 Mar 2007 12:22:05 +0000 (13:22 +0100)]
pointer -> int conversion warning

It doesn't matter, but silence the warning.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoOne more missed s/td->filename/fn_given
Jens Axboe [Mon, 12 Mar 2007 11:42:21 +0000 (12:42 +0100)]
One more missed s/td->filename/fn_given

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFile name generation fix
Jens Axboe [Mon, 12 Mar 2007 11:40:26 +0000 (12:40 +0100)]
File name generation fix

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoAdd nr parameter to file_service_type
Jens Axboe [Mon, 12 Mar 2007 10:44:28 +0000 (11:44 +0100)]
Add nr parameter to file_service_type

Right now we switch for every IO, add a postfix that allows to switch
for every 'x' number of ios.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoNote process vs thread in output
Jens Axboe [Mon, 12 Mar 2007 10:29:30 +0000 (11:29 +0100)]
Note process vs thread in output

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoOOM fixes
Jens Axboe [Mon, 12 Mar 2007 10:21:48 +0000 (11:21 +0100)]
OOM fixes

Hit this with many threads running.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoQuit on thread creation failure
Jens Axboe [Mon, 12 Mar 2007 10:03:04 +0000 (11:03 +0100)]
Quit on thread creation failure

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoIf filename not given, use jobname
Jens Axboe [Mon, 12 Mar 2007 10:01:25 +0000 (11:01 +0100)]
If filename not given, use jobname

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoReturn EIO for verification failure
Jens Axboe [Mon, 12 Mar 2007 09:05:08 +0000 (10:05 +0100)]
Return EIO for verification failure

We passed back 1, where we need some sort of symbolic error.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agosyslet engine: residual fix
Jens Axboe [Mon, 12 Mar 2007 08:43:05 +0000 (09:43 +0100)]
syslet engine: residual fix

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoIf residual count == full count, fail the io
Jens Axboe [Mon, 12 Mar 2007 08:37:46 +0000 (09:37 +0100)]
If residual count == full count, fail the io

We always do blocking io, so regard nothing read/written as an error
condition.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoOverwrite fix
Jens Axboe [Mon, 12 Mar 2007 08:32:47 +0000 (09:32 +0100)]
Overwrite fix

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFile truncation and extend fixes
Jens Axboe [Mon, 12 Mar 2007 08:25:55 +0000 (09:25 +0100)]
File truncation and extend fixes

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoClear ->rate_bytes on do_io() loop
Jens Axboe [Mon, 12 Mar 2007 07:02:10 +0000 (08:02 +0100)]
Clear ->rate_bytes on do_io() loop

We don't do rates across loops, so remember to clear ->rate_bytes
when we start a new loop.

Problem report from "Ananiev, Leonid I" <leonid.i.ananiev@intel.com>

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoTurn the CPU burner into a real io engine
Jens Axboe [Fri, 9 Mar 2007 13:34:23 +0000 (14:34 +0100)]
Turn the CPU burner into a real io engine

This removes the special casing in fio.c for the cpu engine, and
also gets rid of FIO_CPUIO.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agonull engine: fix queue bug with repeated commit() calls before event retrieval
Jens Axboe [Fri, 9 Mar 2007 12:45:11 +0000 (13:45 +0100)]
null engine: fix queue bug with repeated commit() calls before event retrieval

Don't return anything if min_events == 0. This exposed a bug in
the commit handler, it needs to add to ->events, not set it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agonull engine: update to support queuing
Jens Axboe [Fri, 9 Mar 2007 12:23:14 +0000 (13:23 +0100)]
null engine: update to support queuing

Useful for queue testing.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoDocument 'openfiles' option
Jens Axboe [Fri, 9 Mar 2007 12:03:00 +0000 (13:03 +0100)]
Document 'openfiles' option

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoFix ->file_map leak
Jens Axboe [Fri, 9 Mar 2007 11:52:15 +0000 (12:52 +0100)]
Fix ->file_map leak

Just to appease valgrind.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoRemove ->mutex after last use, not on job exit
Jens Axboe [Fri, 9 Mar 2007 11:42:35 +0000 (12:42 +0100)]
Remove ->mutex after last use, not on job exit

Frees up that file descriptor.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoShrink the semaphores a little
Jens Axboe [Fri, 9 Mar 2007 11:40:02 +0000 (12:40 +0100)]
Shrink the semaphores a little

The downside is that they hold the fd open, so it steals one
possible file open per-file. Will fix that in the next commit.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 years agoMake sure each job loads a private io engine
Jens Axboe [Fri, 9 Mar 2007 08:00:06 +0000 (09:00 +0100)]
Make sure each job loads a private io engine

Threads got it shared, breaks for obvious reasons. Also gets rid
of the free hack in ioengine unload.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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

12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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

12 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>
12 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

12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>
12 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>