History log of /external/fio/io_u.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
efd633f3ae8fd7aa81bd2a106629aba6f2a0bd76 28-Jan-2015 Vasily Tarasov <tarasov@vasily.name> dedupe_percentage should work even if compress_percentage is not set

Currently dedupe_percentage option does not work properly if
compress_percentage is not set. This can be easily demonstrated using
the following job file:

[job-/dev/dm-0]
filename=/dev/dm-0
rw=randwrite
blocksize=4096
direct=1
ioengine=libaio
iodepth=32
dedupe_percentage=50
time_based=1
runtime=5
numjobs=1

All writes will contain zeroes for the above job file.

The problem is in fill_io_buffer() function that switches dedupe random
state only if o->compress_percentage is set.

This patch updates the condition appropriately in fill_io_buffer()
appropriately.

Signed-off-by: Vasily Tarasov <tarasov@vasily.name>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
e67b9287df3531ee295e54f2420001c535dc191a 27-Jan-2015 Justin Eno <jeno@micron.com> Better accommodate random writes larger than blockalign

fill_io_u() fails prematurely if the randomly-chosen offset satisfies
blockalign but not min_bs, i.e., the offset lies too near the end of
the target region. This change honors both parameters.

Signed-off-by: Justin Eno <jeno@micron.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
7e63b3dbede9a9695a0235ec03884818cf1375b4 15-Jan-2015 Jens Axboe <axboe@fb.com> Improve rate limiting

If we have pending IO, we should commit it before going to sleep,
not just wait for IO that has already been issued.

Also improve the delay functions to return the time spent, so
that users don't have to track tha separately if they care about
the precision.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
d55dd0413b5f2df5e637c9c6e752b4272e4a1e5f 15-Dec-2014 Jens Axboe <axboe@fb.com> file: unionize lfsr/randommap

We only use one of them, add file flags to distinguish between the
two.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
08a99bed133fdd5dd6ef87c8638b45b135b10a8e 15-Dec-2014 Jens Axboe <axboe@fb.com> Fix read/write mix and different levels of randomness

Stephen reports:

When using fio configuration below:

[global]
ioengine=libaio
direct=1
runtime=600
bs=32k
iodepth=8
rw=randrw
rwmixread=80
percentage_random=100,0

[drive1]
filename=/dev/sda

I am expecting to see 80% reads, 20% writes where all reads are random
and all writes are sequential. I captured a bus trace of traffic to the
disk and the bus trace reflected as much with one issue. The write
commands are essentially random. Each write begins at a new random LBA.
If 2 or more writes occur in a row, the LBA's are sequential based on
the block size BUT I feel the heart of this feature would be to emulate
a large file write during random access. With that in mind would it be
possible for sequential reads or writes within mixed sequential/random
workload to remember the last LBA accessed? In this scenario the writes
would still only take up 20% of the workload but when a write did occur
it should be the next sequential step from the last write.

-----

This is due to the fact that fio tracks last start/end on a unified
basis, not per read/write/trim direction. Fix that.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
fd1583f077bb4f77a462ca1ac7274f443f9372ce 04-Dec-2014 Jens Axboe <axboe@fb.com> Use specified buffer_pattern (if given) for all io_u fills

For compression, we use a fixed '0' pattern. But if the user
specified a pattern to use in the job file, then we should
use that instead. It could slightly skew the compression ratio
for long patterns, but that is to be expected.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
46ad62dc54ba3338bceb8ecde7cc265c3f02ec9e 24-Nov-2014 Jens Axboe <axboe@fb.com> lfsr: don't pass in last value to lfsr_next()

It's cached in the 'fl' struct. This means we can move the max
block calculation outside if the lfsr part, too.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
de54cfd8b8e93d2a32a02961f1587b83f0763aa8 11-Nov-2014 Jens Axboe <axboe@fb.com> Add support for verify triggers and verify state saving

This allows you to (for instance) instantly terminate a verify
write workload, and then later that everything was written
correctly up to that very point. This can be useful for testing
powercut scenarios, which is often problematic on storage
devices.

The trigger part is a file based notification scheme, similar
to what is provided for the status dumps. When triggered,
fio will exit immediately and write the verify state safely
to disk. A trigger can be accompanied by a trigger command.
Say you wanted to test powercut safety, the trigger could be
something that immediately cut power to the machine.

The verify state is either saved locally (if run locally),
or saved over the network if run in client/server mode.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
d4eb4654a799f4a878ae62fac8e3c758a5dae0f8 10-Nov-2014 Jens Axboe <axboe@fb.com> Get rid if ddir_trim() macro

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
0f7f9a918590b45589224568245f75e2dbff9e14 06-Nov-2014 Jens Axboe <axboe@fb.com> Make fio -Wshadow clean

Found a few issues, actually.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
f678701783f1c200ce574215feeb7ff801c4ff72 06-Nov-2014 Jens Axboe <axboe@fb.com> Get rid of __ prefix for internal frand state

It made (some) sense when we had both OS and frand in anon unions,
but now lets just kill it.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
559073f664a872f32632892c560667097b29e963 06-Nov-2014 Jens Axboe <axboe@fb.com> Remove use of OS provided random functions

We added the internal random generator a long time ago, and kept
the OS variant around as an opt-in feature with using use_os_rand=1.
We defaulted to using the fio provided one, and I doubt that
anyone has used the option.

The time has come to kill it.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
5a48d3065f529c9935cc48d77963fe59691de533 30-Sep-2014 Jens Axboe <axboe@fb.com> Constify 'td' in a few functions

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
418bf546a8c75a8208cc219cfa0be52c1a33ad9c 29-Sep-2014 Jens Axboe <axboe@fb.com> Fix bug with zone and zone skipping and io_limit

If you do:

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

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

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
8a42394ebd5d31d4df2df6cf441c49edb12e2df0 29-Sep-2014 Jens Axboe <axboe@fb.com> Fix bug with rw sequence offset and io_limit

If you do:

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

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

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
8e0aa1607d3e2b583dac6780527db49c27cbae6c 26-Sep-2014 Jens Axboe <axboe@fb.com> Improve dedupe/compression buffer filling for mixed block sizes

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
64d3bab79b116689ddcc40d23a42e31e4e47ad53 22-Sep-2014 Jens Axboe <axboe@fb.com> dedupe: if percentage is 100, don't go through random + math

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
e66dac263f65ed4d762299dcdc4f9a6a3fb427a7 22-Sep-2014 Jens Axboe <axboe@fb.com> Basic support for dedupe

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

dedupe_percentage=70

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

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
2cbdcdb89872bddd73464eb296c39b94823fd03b 17-Sep-2014 Robert Elliott <elliott@hp.com> fio: print io_u errors on one line

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

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

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

Signed-off-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
059c406c68fe5a9c26fc9ad4feee73815da2d1fd 17-Sep-2014 Jens Axboe <axboe@fb.com> Fixup data-direction to name translation

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

Reported-by: Elliott, Robert <Elliott@hp.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
05074830620ea0811576e3565cc4c4bd48c89077 04-Sep-2014 Robert Elliott <elliott@hp.com> Fix hangs due to iodepth_low

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

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

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

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

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

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
e69fdf7efe336037a588fdda5a86c9467347c6e0 23-Jul-2014 Jens Axboe <axboe@fb.com> verify: fix a bug with verify_async

There's a race between marking an io_u as deferred, completing it,
and checking of that flag. It cannot be done reliably for async
verify threads. So change the mechanism to have the verify_async
part pull the io_u completely, so we don't have to check for a flag
in it after we have run ->end_io().

This fixes a bug with verify_async, where fio would crash with
this message:

fio: io_u.c:1315: __get_io_u: Assertion `io_u->flags & IO_U_F_FREE' failed

This race has always existed, but was made considerably worse with
this commit:

commit 2ae0b204743d6b4048c6fffd46c6280a70f2ecd1
Author: Jens Axboe <axboe@kernel.dk>
Date: Tue May 28 14:16:55 2013 +0200

Replace list based free/busy/requeue list with FIFO + ring

Cache friendliness of the list is pretty low. This has
provably lower overhead.

since we moved from a single list holding the io, to a separate
verify list and io_u queues. The above bug is happening because
the io_u ends up on both the freelist and the pending verify list,
causing mayhem.

Reported-by: scameron@beardog.cce.hp.com
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
12dbd06d3203840c8ebdc4d0a6135a69c4380949 04-Jul-2014 Jens Axboe <axboe@fb.com> flist: add flist_first_entry()

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
ccefd5fea1de87a83db9c372985b69f4fbbe922c 01-Jul-2014 Jens Axboe <axboe@fb.com> Add option for including byte offset for each log entry

When iops/latency/bw logs are used in the job, we can note the offset
at which the specific data entry took place.

Based on an initial patch from Abutalib Aghayev <agayev@gmail.com>.
Extended by me to:

- Not do this by default, as not to add 8 bytes to each log entry
stored.

- Add support for the client/server protocol.

- Add documentation.

We should bump the server protocol rev again, but that was just done
in the previous commit, so...

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
705fa7eb3261012897a957e94a776dc393093bc0 28-Jun-2014 Andrey Kuzmin <andrey.v.kuzmin@gmail.com> Fix typo in io_u.c::get_next_file()

We should check ops->get_next_file() is TD_F_PROFILE_OPS
is set, not if it's unset.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
890b665611751661aac1030603175bb7bbde34bc 07-May-2014 Jens Axboe <axboe@fb.com> verify: fix verification of uncompleted or errored ios

Stoo Davies reports:

------

I'm doing some powerfail recovery testing on a storage array over iSCSI.
Host is RHEL 6.4 kernel 2.6.32-358.el6.x86_64.

With fio 2.1.2 -> 2.1.4 the job file below rides through the disks going
away, and continues I/O after they come back, without reporting any
errors. With fio 2.1.5 -> 2.1.8 when the disks come back fio
immediately reports a meta verification error.

I captured a trace with an finisar analyzer, and can see that after the
disks come back and the host logs back in, a read is issued for an lba
which was never written to. Since I don't see verification errors
outside of the powerfail testing, I suspect fio isn't correctly handling
failed writes during the time the disks are unavailable.

------

The issue is caused by a change between 2.1.4 and 2.1.5 that started
logging IO for verification at issue time, instead of at completion
time. If the IO only partially completes or completes in error, then
we need to adjust the verification unit so that we verify only what
fio actually wrote.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
71b84caab6ef5ddbc7893e3268887b8ff0516f75 14-Apr-2014 Jens Axboe <axboe@fb.com> td_verror() needs errno style error

put_file_log() could pass in -1, we need the actual error instead.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
9ee1c647001865a20324cbc2d7c1d68f0f24503e 02-Apr-2014 Erwan Velu <erwan.velu@enovance.com> io_u: Using initialized local variable

ddir was feed with io_u->ddir at init time but didn't got used before
reassign it to the same value or another one.

That was making this init useless.

This patch simplify this portion of code by using the initialized
variable.
/external/fio/io_u.c
bedc9dc24223bb33be4120f4a57718bc54888ca5 17-Mar-2014 Jens Axboe <axboe@fb.com> Add support for file appends

Add option file_append (bool). If set, fio will append to a file
instead of operate within the size of it. This is similar to
setting offset= to the size of each file.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
26251d8d635bc9b9d31de2427095684b0c87b836 11-Mar-2014 Jens Axboe <axboe@fb.com> Try a little harder to honor number_ios more accurately

Previously, fio checked this on completion, which means we could
almost spill over by the iodepth setting. Check this before
issue instead, taking the in flight IOs into account as well.

Reported-by: Robert Elliott <Elliott@hp.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
0cae66f6df9eb63d4896c29d7998d4aaf964fea5 03-Mar-2014 Jens Axboe <axboe@fb.com> Silence 'io_u might be used uninitialized' warning

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
80e88a1d4a84cb243a84a950363c0bce8f73d300 28-Feb-2014 Peter Oberparleiter <oberpar@linux.vnet.ibm.com> fio: fix last block never being touched by random offsets

Fix the available range for random offsets which never touched the last block.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
225ba9e3433cf27d8ff7b213d9f78b7ef2776c70 26-Feb-2014 Jens Axboe <axboe@fb.com> Branch and cache miss speedups

Just some low hanging fruit.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
0dac421f0fcd500d658d2fd68bc16416885a874a 25-Feb-2014 Jens Axboe <axboe@fb.com> Fix crash with --debug=file and NULL file return

Don't attempt to dereference that, obviously.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
6bb58215842760895071d9f331da4dc2dfc16f30 21-Feb-2014 Jens Axboe <axboe@fb.com> Improve latency_target runs

Reset the stats when we have found our target, and then do
another latency_window run with those settings so that the
final results reflect the probed values.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
729fe3af470e258690a79ff6ffc4f0e4b313abc8 14-Feb-2014 Jens Axboe <axboe@fb.com> Fix another typo in gtod_reduce()

Forgot one of the variables. Impressive.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
b74b8208826be02d93d0933eb24ad792f4e78f64 14-Feb-2014 Jens Axboe <axboe@fb.com> Fix inverted logic in gtod_reduce()

Fixes a bug in the previous commit, where someone wasn't
thinking straight...

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
aba6c951a6ecfa7f5471fa0c53ccf85afa32e9a5 14-Feb-2014 Jens Axboe <axboe@fb.com> Don't compute iops samples for gtod_reduce=1

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
002fe73409d1e3d5e7dfe2885f75885bfaf506bc 11-Feb-2014 Jens Axboe <axboe@fb.com> Fix issue with openfiles= and file sizing

Fill the given size as well as we can, given the size and nr
of files.

Fix an issue where we don't properly honor how many files to
keep open at any point in time.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
f940128526dbe468a1951cce10c2fe5dbd23875f 06-Feb-2014 Jens Axboe <axboe@fb.com> verify: always log IO in the order they are issued

We currently log verify_backlog verifies when they complete,
which means the sequence of verify and issue might be different.

Change this to log in one spot, prior to issue, and track the
completion state of the logged unit instead. This unifies the
handling of verifies.

Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
9a50c5c5650fdd9f3117e3745f16cc63c5b267b7 05-Feb-2014 Puthikorn Voravootivat <puthik@chromium.org> Fix verify_backlog start verification before finish writing

Due to recent fix for checking rand_seed in verify phase. In write phase,
the IO transaction will be logged before completing the actual data write.
If verify_backlog is enabled, verification may start before all data has
been written. This patch disable that fix if the verify_backlog is enabled.

Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
/external/fio/io_u.c
c4b6117b236370b174f3e3d2e299bf8b3733be97 05-Feb-2014 Puthikorn Voravootivat <puthik@chromium.org> Fix rand_seed mismatches in verify phase

In verify phase, the rand_seed generated on replay does not match
the written rand_seed.

Multiple problems are causing this:
1. In verify phase fio does not set io_u->rand_seed to compare with
hdr->rand_seed
2. In randrw scenario, fio log is stored in red-black tree in "sorted by LBA"
order. Thus, it is imposible to replay the written order, or rather
generate the seeds again in the same order.
3. In write phase, the code currently will generate rand_seed, write data
and log rand_seed. When queuedepth > 1, it's possible the writes complete
in a different order than rand_seed was generated. Thus when replaying
the log, the generated rand_seed might not match what was written.
4. verify_backlog option will start verification before all the data has been
written and it make rand_seed replay code broken with current design.

Proposed fixes:
1. Use of existing verify_state to generate verify header.
(and assumes this was the original intention of verify_state). And also
adds code to replay rand_seed in verify phase.
2. If verifysort option is not enabled, store the write log in a list instead
of the red-black tree. Otherwise, don't attempt to verify the rand_seed
in the header.
3. In write phase, generate rand_seed, log rand_seed, write data. I.e. log
IO transactions in the order generated, not completed.
4. Don't verify rand_seed when verify_backlog is enabled.

Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
ce35b1ece06ce27ebff111e47c2a6610c311a92b 14-Jan-2014 Jens Axboe <axboe@kernel.dk> Add option for specifically setting buffer contents

Fio can use zeroes, slightly scrambled data, full random data,
or specifically compressible data. With this option, the user
can now fully control the pattern written, similarly to how
verify_pattern works for verify=meta.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
3e260a46ea9a8de224c3d0a29a608da3440f284a 09-Dec-2013 Jens Axboe <axboe@kernel.dk> Add options to have fio latency profile a device

This adds three new options:

- latency_target. This defines a specific latency target, in usec.
- latency_window. This defines the period over which fio samples.
- latency_percentile. This defines the percentage of IOs that must
meet the criteria specified by latency_target/latency_window.

With these options set, fio will run the described workload and
vary the queue depth between 1 and iodepth= to find the best
performing spot that meets the criteria specified by the three
options.

A sample job file is also added to demonstrate how to use this.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
f713350f74dbeb333ff1ad2790cb60381ceaf463 09-Sep-2013 Jens Axboe <axboe@kernel.dk> Fix broken requeue of io_us

Suresh reports:

-----

Does a requeued io_u work get submitted again through __get_io_u() ? If
so, the io_u item is taken out of requeue list & then the io_u->file is
set to NULL. We don't make a distinction about item being already setup
Vs a new io_u in __get_io_u(). In get_io_u(), when an io_u may come out
of requeue list, we depend on io_u->file to be non NULL to detect the
work as old pending one.

Am I missing something here or is this a bug?

1274 io_u = __get_io_u(td);
1275 if (!io_u) {
1276 dprint(FD_IO, "__get_io_u failed\n");
1277 return NULL;
1278 }
1279
1280 if (check_get_verify(td, io_u))
1281 goto out;
1282 if (check_get_trim(td, io_u))
1283 goto out;
1284
1285 /*
1286 * from a requeue, io_u already setup
1287 */
1288 if (io_u->file)
1289 goto out;
1290
"io_u.c" line 1286 of 1667 --77%-- col 3-10

1130 struct io_u *__get_io_u(struct thread_data *td)
1131 {
1132 struct io_u *io_u;
1133
1134 td_io_u_lock(td);
1135
1136 again:
1137 if (!io_u_rempty(&td->io_u_requeues))
1138 io_u = io_u_rpop(&td->io_u_requeues);
1139 else if (!io_u_qempty(&td->io_u_freelist))
1140 io_u = io_u_qpop(&td->io_u_freelist);
1141
1142 if (io_u) {
1143 io_u->buflen = 0;
1144 io_u->resid = 0;
1145 io_u->file = NULL;
1146 io_u->end_io = NULL;
1147 }
"io_u.c" line 1130 of 1667 --67%-- col 1

-----

We want a retry of a requeue to be identical, not some
new chunk (and drop the latter one on the floor). This got broken with
the introduction of the rings instead of lists, where a single if
section was split into two.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
ddf24e42b5f801e6a66f8976c97edcb88080ecdf 09-Aug-2013 Jens Axboe <axboe@kernel.dk> Add number_ios= option

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
9b7e600ddb531fd359322bbc14e358c10761fe57 02-Aug-2013 Erwan Velu <erwan@enovance.com> iolog: Logging blocksize in IOPS traces

When saving bandwidth's with write_bw_log option, the last column
provides the blocksize used during the run.

When doing the same with write_io_log option, the last column was always
set to 0 which is confusing when reading the log file later.

This patch put both write_bw_log & write_io_log using the same semantic
by reporting the blocksize for every sample.
/external/fio/io_u.c
6aca9b3d1042bef94958ebee0656755a91695f4b 25-Jul-2013 Jens Axboe <axboe@kernel.dk> Add support for bs_is_seq_rand

This option will switch the meaning of the read,write part of any
blocksize setting to mean sequential,random instead.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
d94722713ebd7bbdbf8b284b7563f2dd17964e24 25-Jul-2013 Jens Axboe <axboe@kernel.dk> Add support for randomness of any IO direction

sequential_random used to be applied to all of the IO
directions, with no possibility of having different settings
for reads, writes, and trims. Now it supports setting each of
them individually.

By default, if you do:

sequential_random=50

it will still apply to all three. If you do:

sequential_random=10,90,80

you would get reads 10% random, writes 90% random, and trims
80% random.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
a9f70b1f50879346fb065497951352ad4e1e0f11 09-Jul-2013 Josef Bacik <jbacik@fusionio.com> Make sure io_u->buflen is aligned to the verify_interval

If you specify verify and bs_unaligned you can make fio blow up in interesting
ways. This is because the verify code assumes that the buflens will be bs
aligned and therefore aligned to the verify_interval. However this isn't the
case for bs_unaligned. So to fix this make sure we are always aligned to
verify_interval. This keeps us from reading off the end of our io buf, or worse
writing past the end of it and makes this fio job pass properly instead of
blowing up. Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
2ae0b204743d6b4048c6fffd46c6280a70f2ecd1 28-May-2013 Jens Axboe <axboe@kernel.dk> Replace list based free/busy/requeue list with FIFO + ring

Cache friendliness of the list is pretty low. This has
provably lower overhead.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
d4afedfd152cea890ffa7d45bf1664fb70218c45 22-May-2013 Jens Axboe <axboe@kernel.dk> Start of ACT like benchmark profile

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
002e7183cb86d6100efef690b6fa90bf0988b084 17-May-2013 Jens Axboe <axboe@kernel.dk> Ensure that we have no IO pending when sleeping

For rate limiting or thinktime handling, ensure that we have
no busy IO when we do spin or sleep. Otherwise we potentially
skew the latencies a lot, since events could have been reaped.

Already working for rate iops, just abstracted it out and
ensure that we do the same for thinktime. Only a problem for
certain workloads, those with queuedepth > 1.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
cc86c395fd9dd2002ec1edc0967b7c9453debdfb 03-May-2013 Jens Axboe <axboe@kernel.dk> Honor random/zero/compressible settings for filling an initial file

Right now we only do that for when the job writes, do it for the
initial setup as well. Otherwise you just get zero filled files
initially, which might not be what you want.

Also fixes a bug with compression if compress_chunk isn't set.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
211c9b8948b43ed47aedf1227e0444a58db015e4 26-Apr-2013 Jens Axboe <axboe@kernel.dk> Add support for modifying the randomness of a workload

Fio supports random or sequential IO, or random IO with a number of
sequential IOs in between. The percentage_random options allows
more fine grained control over this. It defaults to 100, which would
make any random workload still purely random. If set below 100,
there will be some percentage of sequential IOs. This happens randomly,
but at the specified percentages.

The percentage_sequential option is just the complement of that, it
is guaranteed that:

percentage_sequential + percentage_random == 100%

The later setting has priority, each will adjust the other.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
4e0a8fa2593006505b7f4e18931a201d221b49e9 15-Apr-2013 Jens Axboe <axboe@kernel.dk> Fixup bad logging types

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
c3a1b740381cb19e467c8588562bac4d6cbbb199 07-Mar-2013 SEOKYOUNG KO <seokyoung.ko@samsung.com> Fix skewed latencies for rate IOPS

- when -rate_iops is specified, FIO periodically calls usleep() to limit IOPS

- Before usleep(), FIO always wait until the completion of all pending I/O

- For all I/O completions, FIO shows erroneous behavior of logging their
latency, with that of the longest latency IO sample.

- w/ QD=8/ mixed R:W=33:66, up to 7 samples may get false latency log when
waiting all I/O completions => False report of latency distribution

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
4b91ee8fd12c72bd76ce9f5ff9116626b48566a0 25-Feb-2013 Jens Axboe <axboe@kernel.dk> Fixup wrong types for dprint()

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
315fcfec5f22d6c0d059c4c3b70eaed53237eb5f 08-Feb-2013 Jens Axboe <axboe@kernel.dk> Fix rate limiting

Commit e0224c6b accidentally broke rate limiting, since
it bypassed the sleep logic. Rework it slightly to not
skip that.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
e0224c6bd115b0decd4f330fa8ff43f5e0cc6811 07-Feb-2013 Jens Axboe <axboe@kernel.dk> Fix bug with rate and read/write mixed workloads at 100% bias

The rate_ddir() might sometimes decide to send the other data
direction, even if we have a workload with rw=randrw and
rwmixread=0. Check for this condition.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
100f49f105126a26de6f1069679c20fd75194188 23-Jan-2013 Jens Axboe <axboe@kernel.dk> verify: stop on actual number of bytes needed to be verified

If we don't use LFSR or a random map, we don't get told when
to stop by the random generator or map. So track it on the
side, using the same mechanism as do_io().

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
bcd5abfa9f230bbe4365dad1289fdea1f5509f74 23-Jan-2013 Jens Axboe <axboe@kernel.dk> Make experimental_verify=1 handle all cases properly

- Don't track written bytes, just replay the workload by resetting
all the random generators. This should work for any mixture of IO.

- Handle trims for verify.

- Ensure that rwmix is replayed properly for verify.

- Fixup logging for replay.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
44cbc6daaae3674ea5d0a113b66596ca24f372e0 21-Jan-2013 Jens Axboe <axboe@kernel.dk> verify: add new experimental mode that requires no meta data

Should work fine, but we need to account and track trims to know
which blocks NOT to verify (or verify as zero).

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
33c48814e08cf961801bf37f759da2748eb3431b 21-Jan-2013 Jens Axboe <axboe@kernel.dk> Re-seed random generator when a file is reset

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
6d68b99712c112fde6dedda6e6e24af3e9552d0e 13-Jan-2013 Bruce Cran <bruce@cran.org.uk> Fix typo (READ/DDIR_READ).

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
1ae83d45ed853cd73b95b89ae14cacac5b97187e 12-Jan-2013 Jens Axboe <axboe@kernel.dk> Pre-load and sort random blocks for pure read verify workloads

If fio is run with a write phase before a read phase and the
IO type is random, the end read verify phase will get sorted
blocks to read back. But if fio is asked to verify something
that was previously randomly written, it will generate the
same random offsets in random order and verify those. This is
usually much slower than a sorted read back.

So add a verifysort_nr option that allows the user to specify
a number of random offsets to pre-generate and sort, before
reading them and verifying the contents. This greatly speeds
up pure read verify workloads.

Default to 1024, and put a max of 64K entries on the option.
We do a merge list sort on the entries, so we don't want a
huge amount of backlog.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
7477673323a943b99ea203bb9434661d13a0159c 11-Jan-2013 Jens Axboe <axboe@kernel.dk> lfsr: ensure we don't generate an offset + buflen that exceeds the max size

Currently we check for the max value, but that doesn't always
work since it may not fit the minimum block size (even if it
is guaranteed to be smaller than the max offset). Pass in the
last valid block.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
d72be5454c8c5378f16804ff9b8d1afe8729a380 30-Nov-2012 Jens Axboe <axboe@kernel.dk> Cache layout improvements

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
7ebd796f4e50c21d652e62bf1e112755b0f338a8 28-Nov-2012 Jens Axboe <axboe@kernel.dk> Rename the bitmap to axmap

It's not really a bitmap, it's a bitmap of bitmaps. Now named.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
8055e41d0ecc54770a2653427532b3e2c5fabdad 26-Nov-2012 Jens Axboe <axboe@kernel.dk> Add LFSR generator

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
2ab9e98b300c35d3b7807f74d404ce3c5de33fb3 22-Nov-2012 Jens Axboe <axboe@kernel.dk> Restore BUSY_OK bypassing of bitmap

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
51ede0b1e9c9b570b942b50b44d0455183a0d5ec 22-Nov-2012 Jens Axboe <axboe@kernel.dk> Rework file random map

Fio slows down at the end of a random IO run, when the random
map is used and it gets fuller. This causes slowdowns in
IOPS. This is largely due to the file random map being an
array of bits, and with random access to single bits of the
array at the time, locality is awful. The effect is observable
throughout a run, though, where it gradually gets slower and
slower. It just becomes more apparent at near the end of the
run, where the last 10% are fairly bad. This is even with
doing a bunch of tricks to reduce that cost.

Implement an N-level bitmap, where layer N uses a single bit
to represent 32/64-bits at layer N-1. The number of layers
depends on the number of blocks.

This has slightly higher overhead initially in theory, in
practice it performs about the same. As a bonus, the throughput
remains constant during the run, and even becomes faster
near the end.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
24d23ca76f9be4500270e7074a1dab038e3a4a2b 13-Nov-2012 Jens Axboe <axboe@kernel.dk> Get rid of uninitialized_var()

It causes complaints on other compilers (clang). One case
was actually not used at all, initialize the rest to 0.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
c5b3adc41e0a91be5c6accdbe6506522ebddfbdd 08-Nov-2012 Jens Axboe <axboe@kernel.dk> Use ETIMEDOUT instead of ETIME for exceeding max latency

ETIME isn't very portable...

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
9c6f63166eaecc13e4b2ca1d80cc1b5e6185fd43 07-Nov-2012 Jens Axboe <axboe@kernel.dk> Make the zipf/pareto state per file

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
925fee33e47f7eb755ee893e87f0de2bd405a8cc 06-Nov-2012 Jens Axboe <axboe@kernel.dk> Add pareto distribution randomizer

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
e25839d4cb5fefcb5ffce76128a4faedb177e7af 06-Nov-2012 Jens Axboe <axboe@kernel.dk> Add sample zipf distribution randomizer

Instead of just doing purely random IO where each block is
touched exactly (or close to, depending on random map) once,
add a zipf distribution scheme where a selectable theta
defines the spread and frequency of blocks read/written.

Committing this so I don't lose it. Needs a few changes,
for instance we need to hash the zipf output so that
the spread doesn't always just favor the lower LBA range.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
155015351132ad00e2e21cb63f52fee91e56e92a 24-Oct-2012 Jens Axboe <axboe@kernel.dk> Add max_latency option

If set, fio will exit if it sees a total IO latency that exceeds
this value.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
94c6372c7332b69e4f308e46614a6952695fa86c 10-Oct-2012 Bruce Cran <bruce@cran.org.uk> Add pending IO to the tail of the busy list

We add at the head now. The windowsaio engine completes from
the head of the list, so lets ensure that we wait and complete
closer to the submit order.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
8b28bd41375930664a0ff9ff9b101a88ac416ac5 23-Sep-2012 Dmitry Monakhov <dmonakhov@openvz.org> backend: Add configurable non fatal error list

Sometimes it is reasonable to perform test nearly system limits where
errors are possible and expected, in that case one may provide non
fatal error list which will be ignored during execution.
This patch add two options:
ignore_error: List of non fatal error
error_dump: Whenever ignored list should be dumped to log.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
6eaf09d6e9ca1f8accb057cdb18620b7e53ae33f 14-Sep-2012 Shaohua Li <shli@fusionio.com> Add support for trim as a workload type

This only works on Linux so far, and it's always sync given what
the interface to the kernel looks like. Also restricted to pure
block devices.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
ce95d651568bd5494e4c4ddc95832715c6760d56 16-Aug-2012 Dan Ehrenberg <dehrenberg@google.com> Fixing wraparound behavior for time-based sequential read jobs

Previously, a buggy patch made sequential jobs wrap around when they
reached an offset of 'size'. However, the appropriate wraparound is at
size + initial offset. This patch restores the previous behavior.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
ae2fafc8525e980b8271e3230a0fd4da660fddda 23-Mar-2012 webee <webee.yw@gmail.com> verify: verify bytes should not add to this_io_bytes

When rw=readwrite,verify+backlog, the verify are treated as normal
read, and bytes are added to this_io_bytes, cause fio terminate early.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
37cf9e3c608ac9987c1cd120e18e2a8d90ac14db 17-Mar-2012 Jens Axboe <axboe@kernel.dk> Enable read/write sequential offset to be a non-multiple of the block size

The way that fio does offset math internally, if a non-multiple
of the blocksize was given as a sequence offset, it would simply
be ignored due to the block offset division rounding it down.
In other words, if you did:

rw=read:512k
bs=1m

it did not read 1m and 0 offset, 1m at 512k offset, etc. Instead
the hole is ignored.

Fix this by leaving the generated sequential offset in bytes
instead of turning it into a 'fio block'.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
c04e4661e4da3b6079f415897e4507cf8e610c54 16-Mar-2012 Daniel Ehrenberg <dehrenberg@google.com> time_based: Avoid restarting main I/O loop

Previously, when fio had written a volume of I/O equal to the size
argument, it restarted the main do_io loop.

This patch allows time_based tests to be run for longer than one
cycle in the do_io main loop. This has a couple of advantages:
* The random number generator is not reset on each iteration
of the loop, so running longer will reach different locations.
* There is not a throughput-reducing point where all operations
must be reaped before new operations are submitted.

The implementation consists of two minor changes:
* In the do_io loop, a time_based test will not exit the loop for
reading or writing too much data.
* When reading or writing sequentially, the operations wrap around
to the beginning after reading the end within the
get_next_seq_block function.

Modified by Jens to properly restart when using a randommap
as well.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
8a74b56d7aef44ea75d7abf910ad75378b438fe3 16-Mar-2012 Jens Axboe <axboe@kernel.dk> Fix problem with iodepth_batch_complete=0 and accounting

If the queue is full, we always need to reap at least one event.
Otherwise we end up failing get_io_u() and restarting the file.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
82af2a7ca1a543b41c003de69d5e3c36860f47d5 13-Mar-2012 Jens Axboe <axboe@kernel.dk> Fix failure to verify in mixed read/write workload with backlog

If you run a workload like this:

fio --rw=randrw --bs=4k --direct=1 --ioengine=libaio --iodepth=32
--verify=meta --verify_backlog=1024 --verify_fatal=1 --name=ver-test
--filename=foo --size=1G --verify_pattern=0xaaa

Fio ends up never actually verifying the written blocks. This happens
because as we generate an entry to be verified, the backend checks
whether this is a read/write mixed workload. It then thinks that the
READ is just that, a normal READ, when in fact it could be coming
from our verify list.

Mark such a read as coming from our verify list, so that we know if
it's a "normal" read or one generated to verify previously written
data.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
f97a43a191f72ce071fe1140a2888dd5298c9aaa 09-Mar-2012 Jens Axboe <axboe@kernel.dk> Add buffer_compress_chunk option

Instead of doing bs/2 of incompressible and zeroed data for a 50%
compression setting, use the smaller chunk size specified by
this option.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
629f1d7150b142d146f8a3ee3cf0a08d1843ca2e 09-Mar-2012 Jens Axboe <axboe@kernel.dk> Honor refill_buffers even for verifies

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
d1ece0c725b4643bcc0187e99b29e7886fc9705a 07-Mar-2012 Jens Axboe <axboe@kernel.dk> Fix batch mismatch for verifies

If we set verify_backlog=32, we expect 32 writes followed by 32
reads that verify the written data. But if we fail getting a
verify io_u, then we may decrement the batch counter when we should
not. The result is that we write 32, read 32, write 1, read 1, repeat.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
9c42684e32325da26e862280388798343c5f1305 02-Mar-2012 Jens Axboe <axboe@kernel.dk> Add buffer_compress_percentage

The option is pending testing, so not documented yet.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
13af05ae2ece4a277a2f95fd622d1717af538c20 11-Feb-2012 Jens Axboe <axboe@kernel.dk> Only attempt zone switch if we have zones enabled

Just an offset isn't enough.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
6b1190fdf64da94a5d6b22439fa31825160f8734 07-Feb-2012 Steven Lang <tirea@google.com> Enable completion latency stat collection on verify

A patch last year
(http://git.kernel.dk/?p=fio.git;a=commit;f=io_u.c;h=c8eeb9df1f52f28567a5937e141decc6a26ec30b)
changed the behavior of verify loads so they stopped printing
completion latency stats. (A verify load in this case includes both
rw=*write with verify and do_verify=1 and rw=*read with verify.)

Is there any particular reason that an io_u which is going to be
verified shouldn't have its latency statistics recorded?

This patch re-enables the clat recording.

An example demonstrating the issue here:

$ ./fio --name=test --size=1m --bs=4k --verify=meta --rw=write
test: (g=0): rw=write, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
fio 2.0.2
Starting 1 process
test: Laying out IO file(s) (1 file(s) / 1MB)

test: (groupid=0, jobs=1): err= 0: pid=27535
read : io=1024.0KB, bw=1000.0MB/s, iops=256000 , runt= 1msec
clat percentiles (usec):
| 1.00th=[ 0], 5.00th=[ 0], 10.00th=[ 0], 20.00th=[ 0],
| 30.00th=[ 0], 40.00th=[ 0], 50.00th=[ 0], 60.00th=[ 0],
| 70.00th=[ 0], 80.00th=[ 0], 90.00th=[ 0], 95.00th=[ 0],
| 99.00th=[ 0], 99.50th=[ 0], 99.90th=[ 0]
write: io=1024.0KB, bw=341333KB/s, iops=85333 , runt= 3msec
clat (usec): min=2 , max=13 , avg= 3.30, stdev= 0.78
lat (usec): min=2 , max=14 , avg= 3.52, stdev= 0.84
clat percentiles (usec):
| 1.00th=[ 2], 5.00th=[ 3], 10.00th=[ 3], 20.00th=[ 3],
| 30.00th=[ 3], 40.00th=[ 3], 50.00th=[ 3], 60.00th=[ 3],
| 70.00th=[ 3], 80.00th=[ 4], 90.00th=[ 4], 95.00th=[ 4],
| 99.00th=[ 4], 99.50th=[ 4], 99.90th=[ 13]
lat (usec) : 4=35.55%, 10=14.26%, 20=0.20%
cpu : usr=0.00%, sys=0.00%, ctx=0, majf=0, minf=46
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued : total=r=256/w=256/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
READ: io=1024KB, aggrb=1000.0MB/s, minb=1024.0MB/s,
maxb=1024.0MB/s, mint=1msec, maxt=1msec
WRITE: io=1024KB, aggrb=341333KB/s, minb=349525KB/s,
maxb=349525KB/s, mint=3msec, maxt=3msec

Note that no clat line is reported for reads and no clat percentiles
are listed. If a read-only load is then executed, it has the same
thing.

$ ./fio --name=test --size=1m --bs=4k --verify=meta --rw=read
test: (g=0): rw=read, bs=4K-4K/4K-4K, ioengine=sync, iodepth=1
fio 2.0.2
Starting 1 process

test: (groupid=0, jobs=1): err= 0: pid=31694
read : io=1024.0KB, bw=13653KB/s, iops=3413 , runt= 75msec
clat percentiles (usec):
| 1.00th=[ 0], 5.00th=[ 0], 10.00th=[ 0], 20.00th=[ 0],
| 30.00th=[ 0], 40.00th=[ 0], 50.00th=[ 0], 60.00th=[ 0],
| 70.00th=[ 0], 80.00th=[ 0], 90.00th=[ 0], 95.00th=[ 0],
| 99.00th=[ 0], 99.50th=[ 0], 99.90th=[ 0]
cpu : usr=0.00%, sys=0.00%, ctx=15, majf=0, minf=36
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued : total=r=256/w=0/d=0, short=r=0/w=0/d=0

Run status group 0 (all jobs):
READ: io=1024KB, aggrb=13653KB/s, minb=13981KB/s, maxb=13981KB/s,
mint=75msec, maxt=75msec

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
52c580272d87d2b9b8a65d317bf7c2d432a30fec 06-Feb-2012 Jens Axboe <axboe@kernel.dk> Fail if we can't satisfy the minimum block size

Commit 799441286648bdced4f42d3040f37fd2e35eaf1d introduced a bug
where if we cannot satisfy the minimum block size from a given
offset, then we will loop forever trying to do that. Fix that bug
checking early if it is indeed a possible thing to satisfy, if
not give up.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
81f0366c7adcd5d70de5c1b144eafd366933f78e 02-Feb-2012 Jens Axboe <axboe@kernel.dk> Reenable io_u->buf_filled_len optimization

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
422f9e4b57549ce1e163b9c1de71932d9ea24de4 31-Jan-2012 Ryan Marchand <rmarchan@amazon.com> Fix thread hang when using async engines (libaio,etc.) when too low of a iops rate is specified.

Rate limiting logic was using thread_data->cur_depth to decide the
min_evts number to ask for during its "flush" prior to sleeping.
td->cur_depth, however, does not properly track in-flight IOs submitted
to the async engines. Added field to thread_data structure and use
that, instead, to track IOs currently in flight.

Signed-off-by: Ryan Marchand <rmarchan@amazon.com>
Signed-off-by: Steven Noonan <snoonan@amazon.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
ed33585509a97c4a65e46967cb49419b6a4f8870 31-Jan-2012 Steven Noonan <snoonan@amazon.com> implement zoned random I/O testing support

This fixes the limitation that prevents fio from doing random I/O with zones
enabled.

This also adds a 'zonerange' configuration option which may be too ambiguous
and is subject to potential renaming in the future.

When doing random I/O, it is beneficial to be able to specify how large the
addressible space is in the zone, while specifying a different metric for
how much data to read from that zone (i.e., how many samples to take from each
zone). When 'zonerange' is not specified, it defaults to be equal to the
'zonesize' option. When both are specified, 'zonerange' indicates the
size of the zone while 'zonesize' indicates the quantity of data to read from
each zone.

Signed-off-by: Steven Noonan <snoonan@amazon.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
068420271828b3b2426ffc3ccf64404cb9d340fb 17-Nov-2011 Steven Lang <tirea@google.com> Expand continue_on_error to select which type of error to allow

This expands the continue_on_error option to take a string specifying
what type of error to continue on, breaking out errors into read,
write, and verify. (Sync, trim, and anything else not specifically a
read are considered write operations for the sake of error
continuation.)

Backwards compatibility is retained by allowing =0 and =1 values to
specify none and all, respectively.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
1b8dbf256b974fac2864052931f3041ff3ead157 09-Nov-2011 Steven Lang <tirea@google.com> Improve accuracy of rate= option

I noticed that the rate= option is not terribly precise in some cases.
It gets worse the higher the selected rate. For example:
$ fio -name=load -size=100g -ioengine=null -runtime=10 -rate=30m
One would expect that to read 300MB (307200KB) at close to 30MB/s
(30720KB/s). However it writes 315024KB at 31499KB/s. Further
experimentation shows that even higher rates can show bigger
discrepancies. At the extreme end...
$ fio -name=load -size=100g -ioengine=null -runtime=10 -rate=500m
One would expect this to write 5000MB at a rate of 500MB/s
(512000KB/s). However it writes close to double that (9536.8MB) at a
rate of over 953MB/s. At a rate of 1GB/s and higher, the rate
limiting is effectively ignored.

This patch improves the accuracy of the rate= option across the whole
range of rates, at the cost of being very slightly more
computationally expensive.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
d7ee2a7d431c2cabdf56d04ca14805cad72cf985 26-Oct-2011 Steven Lang <tirea@google.com> Fix segfault with verify_async

At some point the filename was added to the report on verify failures,
however this broke verify_async, as the file pointer on the io_u is
set to NULL before the verify thread sees the io_u.  The result is a
segfault when there is a verify mismatch.

This patch changes the semantics of a deferred free (IO_U_F_FREE_DEF)
to have already called put_file, but not set the file pointer to NULL.
 This is safe to do as the file list is only freed after all the
verify threads have been terminated.

FYI - this is the minimal config to cause the error this patch fixes,
and is what I used to test the fix. (Not using thread still causes a
segfault, but it is reported more subtly since just a sub-process hits
it.)

[segv]
ioengine=null
size=4k
verify=meta
rw=read
thread
verify_async=1

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
fddc6604f91ebf76d9090741f9d4f5a4d33be0c6 12-Oct-2011 Jens Axboe <axboe@kernel.dk> Merge branch 'master' into client-server

Conflicts:
init.c
io_u.c
os/windows/install.wxs
os/windows/version.h

Signed-off-by: Jens Axboe <axboe@kernel.dk>
15b87723551b424d0db4c53577b567e670c7d4d8 12-Oct-2011 Jens Axboe <axboe@kernel.dk> Fix bad random offset generation for file map

If OS_RAND_MAX and FRAND_MAX are different, then ensure that
we use the right one. If not, our lookup cache could be outside
the allowed range, thus causing a segfault by indexing
f->file_map beyond end of the array.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
5f03ff75ff84cd473ae7060415d5f85039f07ab7 05-Oct-2011 Jens Axboe <axboe@kernel.dk> Fix for hosed end-of-run log numbers

For queued IO workloads, we complete the pending count in one
go at the end of the run. But the completion time isn't updated,
so we end up getting a lot of tail log entries that are identical
if the timing is against us.

Fix this by only accounting the first of the last batch of ios.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
c8eeb9df1f52f28567a5937e141decc6a26ec30b 05-Oct-2011 Jens Axboe <axboe@kernel.dk> Add support for write_iops_log

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
fba76ee8650e1d3d3a897055f6ba3b88b8e437ce 27-Sep-2011 Jens Axboe <axboe@kernel.dk> Scramble corruption fix

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
fad82f76eaa03e2f486315537e9d83809d155d58 19-Sep-2011 Jens Axboe <axboe@kernel.dk> Scramble fix

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
fd68418e1f248e85809312d6fa789eaf57b54dc0 19-Sep-2011 Jens Axboe <axboe@kernel.dk> Add option for controlling buffer scrambling

scramble_buffers bool option, defaults to on.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
/external/fio/io_u.c
23f394d5d70902c6f1d71ac03fa1d70e13c9c0b9 16-Sep-2011 Jens Axboe <axboe@kernel.dk> 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>
/external/fio/io_u.c
de78976982fe7f57ccadd15a19dae167f0ce62ab 16-Sep-2011 Jens Axboe <axboe@kernel.dk> 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>
/external/fio/io_u.c
3545a109a2cfe5ab22969ef453dc049db47f0b68 31-Aug-2011 Jens Axboe <jaxboe@fusionio.com> Ensure that buffer contents are random across jobs as well

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
a66da7a2354aac16757c75a824ad7cbba678535c 31-Aug-2011 Jens Axboe <jaxboe@fusionio.com> 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>
/external/fio/io_u.c
78c1eda5486f586ca73e9cbe7e40b93fccdbd218 30-Aug-2011 Jens Axboe <jaxboe@fusionio.com> 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>
/external/fio/io_u.c
059b080217b86dbf9f3574c4661a1b2300522c79 25-Aug-2011 Jens Axboe <jaxboe@fusionio.com> 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>
/external/fio/io_u.c
799441286648bdced4f42d3040f37fd2e35eaf1d 24-May-2011 Jens Axboe <jaxboe@fusionio.com> Fix overlap io_u into outside regions

Test case is a job file ala this:

[global]
ioengine=posixaio
direct=0
filename=testfile
iodepth=128
size=50M
loops=10000000000
group_reporting=1
readwrite=randwrite
do_verify=1
verify=md5
verify_fatal=1
numjobs=1
thread
bsrange=4k:1M

[thread0]
offset=0G

[thread1]
offset=50M

[thread2]
offset=100M

[thread3]
offset=150M

[thread4]
offset=200M

[thread5]
offset=250M

[thread6]
offset=300M

[thread7]
offset=350M

where io_u units from threadN ends up crossing into the zone of threadN+1.
This is due to using file->real_file_size as the boundary check for the
buffer length, where the offset itself is correctly calculated. When
using mixed block sizes, this can cause a blocksize larger than the
minimum size to span into the next region.

Fix this by using file->io_size + offset as the end delimeter. Also
improve the logic of dropping to a smaller allowed block size if we do
end up being close to spanning into the next region.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
1294c3ec7a02d20a98b105c1c41b23358afc67e4 11-May-2011 Jens Axboe <jaxboe@fusionio.com> Fix signed int/long truncation on 32-bit architectures

With using our internal random generator, we generate
unsigned ints. But by mistake this was assigned to
a signed long, that doesn't work so well on 32-bit machines.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
4c07ad86c6cc6e158c70a5c625f60144db03f20d 28-Mar-2011 Jens Axboe <jaxboe@fusionio.com> Switch all random generators to be decided by use_os_rand

This includes file sizing, next file, block size selection,
trim state, and verify state.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
d1cea5214a367659a1b10e0886c5f2e21e24e18f 28-Mar-2011 Jens Axboe <jaxboe@fusionio.com> Switch the latter part of the offset generation to __rand() too

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
2615cc4b28e7d0e436a625dff92e6a71ccc6c49b 28-Mar-2011 Jens Axboe <jaxboe@fusionio.com> Switch to using our internal Tausworthe based random generator for offsets

It's both faster and more exhaustive than what is available on
glibc on my test systems. So no downsides, and the upside of having
the same offset generator across all platforms.

This will change the random series, so could alter performance for
your workload since the pattern will be different in sequence. There's
an option to revert to the OS generator, you can add use_us_rand=1
on your job files to retain the old generator offsets.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
0ce8b119b65849e537cab628a176a0ec4238aab0 27-Jan-2011 Jens Axboe <jaxboe@fusionio.com> Fix end-of-job slowdown for random IO with a random map

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
2b13e716c0921356c0930522718e00b8df34293a 19-Jan-2011 Jens Axboe <jaxboe@fusionio.com> Get rid of shadow declarations

Reported-by: Bruce Cran <bruce@cran.org.uk>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
e84b371e121ee224e02a90d01bf9074b759a409f 16-Jan-2011 Jens Axboe <jaxboe@fusionio.com> Clean io_u->buf_filled_len in io_u_fill_buffer()

Not a bug as such, but it could be if we used it in other
locations in the future. So better be safe.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
5e0baa7f423995c4f75070d6a2ee56619e195a36 20-Oct-2010 Jens Axboe <jaxboe@fusionio.com> Fix segfault when passing in size < block_size

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
1ef2b6be973eded12827990ae1a9eb28b7b20be7 08-Oct-2010 Jens Axboe <jaxboe@fusionio.com> Initial support for explicit write barriers

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
0508320e7b175baf336b1f559e13810e69eecb10 23-Sep-2010 David Nellans <DNellans@fusionio.com> Kill leftover debug printf() and re-format a long line

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
a917a8b3dfeefdd7007ba2f46f21fc145574309d 02-Sep-2010 Jens Axboe <jaxboe@fusionio.com> Trim/discard fixes

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
0d29de831183dfd049c97a03008d425ce21e2fa4 01-Sep-2010 Jens Axboe <jaxboe@fusionio.com> Add verify trim support

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
ff58fcede39d16a2c642897cbe5a7f28b2da1950 25-Aug-2010 Jens Axboe <jaxboe@fusionio.com> Add support for replaying blktrace trim/discard

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
825f818eab0cef7683b8ef359642a45ddef8ea8e 25-Aug-2010 Jens Axboe <jaxboe@fusionio.com> Add missing types to io_u_log_error()

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
38dad62d5154ffaad445bd0231b271b9a46a5190 20-Jul-2010 Jens Axboe <jaxboe@fusionio.com> Add rw_sequencer option

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
5736c10dccc4124d99178b94e6759386420e5251 20-Jul-2010 Jens Axboe <jaxboe@fusionio.com> Rename ddir_nr -> ddir_seq_nr

Another mode will be added, so lets rename this one internally
to make the distinction clear.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
10e8a7b30ce2917df9f839d42596c7e3af9a904f 15-Jul-2010 Radha Ramachandran <radha@google.com> No need to use specific flag for io_u fill length

The fill length already provides that information.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
9522850758ecad087891710b391b4e77f6bff839 14-Jul-2010 Jens Axboe <jaxboe@fusionio.com> Turn io_u filled variable into a flag

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
cbe8d7561cf6d81d741d87eb7940db2a111d2144 14-Jul-2010 Radha Ramachandran <radha@google.com> Reuse filled pattern

I made changes to fio so we wld re-use the already populated io_u
buffer (when there is a non-random pattern) during writes. That way
only the header will be re-calculated for every I/O. This way the
buffer wld get populated in the beginning and as long as the
subsequent ios using the same io_u structure are writes and have same
or less block size, it wld get re-used. If any of the subsequent i/o
is a read or has a block size greater than the pre-filled one, then
the buffer is invalidated and will be re-filled at the next write.

Reason for this risky change: (Performance)
I tested this change on a tmpfs(with no swap backing), with the
following config file:
[sscan_write]
filename=/mytmpfs/datafile.tmp
rw=write
bs=64k
size=3G
ioengine=libaio
iodepth=1024
iodepth_low=512
runtime=10800
bwavgtime=5000
thread=1
do_verify=0
verify=meta
verify_pattern=0x55aaa55a
verify_interval=4k
continue_on_error=1

fio-1-41-6 gave 306MB/s and the new change had a performance of 1546MB/s

Side effects/Risks:
There is a risk with this fix, that if the buffer gets corrupted then
the subsequent writes will also be corrupt. I think for both
sequential writes and random writes (with verify, where the I/O log is
replayed) we shld be able to find the first I/O that started with the
corruption and if the buffer is getting corrupted, there are other
issues here.

Testing:
I have tested this fix with sequential write(verify)/random read write
mix combination(with verify).

I think I have taken care of most of the case, but please let me know
if there is anything I have missed. I have attached the patch along
with this email. I think the performance improvement outweighs the
risk associated with the fix. But I will let you decide if you wld
like to pick it up.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
02af09886db695e5ea2b7fd2a632733955f3c03f 24-Jun-2010 Jens Axboe <jaxboe@fusionio.com> Add total latency log

We log submission and completion latencies, also log total latencies.
This makes it easier to graph and make histograms, if you care only
about the complete latency.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
637ef8d9f7645135cf4829894d1e3983cd7a042e 21-Jun-2010 Jens Axboe <jaxboe@fusionio.com> Speedup verify random fills by 10-15x

Move the pseudo-random helper into lib/rand.c and use that
from the verify populate as well.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
da3758bfa36ee05e25e73f33760f17750bd0687c 17-Jun-2010 Jens Axboe <jaxboe@fusionio.com> Ensure we never overlap with existing blocks

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
f8a75c992b8f7166c423f9282b660640c1d6c397 15-Jun-2010 Jens Axboe <jaxboe@fusionio.com> Default verify backlog batch to verify backlog setting if not given

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
9e144189c6e000df8a797312e43a4913f3b83c9a 15-Jun-2010 Jens Axboe <jaxboe@fusionio.com> Add some support for a verify backlog

Instead of writing everything and then verifying everything,
allow a job to specify incremental verify stages. This can
help reduce memory consumption of fio, since we don't have
to store a huge number of verify entries to be processed
when the write phase is complete.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
/external/fio/io_u.c
d77431b5975096bfd9aafb431c0aa656c9ae8fa8 25-Mar-2010 Jens Axboe <jens.axboe@oracle.com> Only use true random generator for initial seed

Than hokus pokus the rest. End result is still OK random, and
it doesn't compress (which is the real test here).

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
27ea68a59f0b17abead399311e24933897ab3da0 25-Mar-2010 Jens Axboe <jens.axboe@oracle.com> "Expand" random number from 32-bit to 64-bit when necessary

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
1fbbf72e16c27a6fda636db3891a41cd37dc6666 25-Mar-2010 Jens Axboe <jens.axboe@oracle.com> First step at speeding up io_u rand refill

Makes it 3x faster here.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
1dec3e0787755c412b326619d63a24c58e7f4a6b 19-Mar-2010 Jens Axboe <jens.axboe@oracle.com> Optimize __get_io_u() for better code foot print

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
44f29692cfba246981bb3c1b894333a6d2209f51 09-Mar-2010 Jens Axboe <jens.axboe@oracle.com> Initial suppor for sync_file_range()

This revs the ioengine to 11, as we now have another data direction.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
7eb36574da703ebdfac414d7428712320f552a96 08-Mar-2010 Jens Axboe <jens.axboe@oracle.com> Make profile io op overrides a dedicated structure

Also add a 'get_next_file' hook while at it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
15dc1934435dc84d66547c4fc92d936224d7238f 05-Mar-2010 Jens Axboe <jens.axboe@oracle.com> Allow profiles to override internal io_u functions

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
ba3e4e0ca697f83c97a250d85a74506ace69de2c 09-Dec-2009 Radha Ramachandran <radha@google.com> Fix rate option with iodepth > 1

The rate option currently doesnt work when used with libaio engine.
The math currently, calculates the time t2 (when the I/O completed) -
t1 (when the io_u unit was created) as the time it takes for the I/O
and the bandwidth for the rate calculation is calculated from that.
This math will work correctly for sync engine as there is only one io
in progress at a time, but for libaio engine, when there are multiple
I/Os queued, the same time (as in from t1 to t2) could be attributed
to other I/Os as well so the actual bandwidth is actually higher.
I have a patch, but this is more brute force where I take the total
bytes read/written divided by the time since I/Os started to calculate
the bandwidth and decide on the time that needs to be spent sleeping
(if any).This is a little more heavy weight than the previous math. I
think there are probably simpler/cleaner solutions than this but this
is the current patch I have for it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
2ecc1b57721e3cb72bbf558bc169c97037fe3d0a 04-Nov-2009 Jens Axboe <jens.axboe@oracle.com> Fix race on io_u->flags

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
0c41214ff4e6f31f8df64aac37be7853aada6f1f 03-Nov-2009 Radha Ramachandran <radha@google.com> Fix race condition when using asynch verify

I discovered the race condition when using asynch verify with libaio engine.
The code assumes that because the td->cur_depth value is not 0 that
there is still I/O pending and issues io_getevents when the I/O was
actually being verified by the asynchronous verify thread. This causes
the code to hang.

(Updated by Jens to use a new io_u->flag bitfield instead of adding a new
integer to struct io_u).

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
0b9d69ecb14045cf3b2622ae922756b9889b25e6 11-Sep-2009 Jens Axboe <jens.axboe@oracle.com> Silence the style/whitespace police

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
01a1caa5de2199b7679b7becf0e8c63e0ecfc373 10-Jul-2009 Jens Axboe <jens.axboe@oracle.com> Fix broken completion latency numbers

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
e8462bd8250cf3ff2d41f17e1a4d4cefc70b6b37 06-Jul-2009 Jens Axboe <jens.axboe@oracle.com> Add support for async IO verification offload

This adds support for setting up a number of IO verification offload
threads, instead of doing the offload inline. An option for controlling
the CPU affinity of those threads are always added.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
d529ee1932bc85598900a3ef62f01293af87fbd8 01-Jul-2009 Jens Axboe <jens.axboe@oracle.com> Add support for the iomem_align option

This allows detailed control of the alignment of the IO buffers
that fio uses.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
5f9099ea8adf423d0db01274ef0d7e65629c0e1c 16-Jun-2009 Jens Axboe <jens.axboe@oracle.com> Add support for fdatasync()

Adds a new option, fdatasync=. It's identical to the fsync= option,
but uses fdatasync() instead.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
f2bba1820a567ac00b09916239ac8feb125cead2 15-Jun-2009 Radha Ramachandran <radha@google.com> Add a 'continue_on_error' option to fio

Add option to make fio continue on non-fatal errors.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
b23b6a2f66637e326c5825bf438059ecc62008d4 11-Jun-2009 Jens Axboe <jens.axboe@oracle.com> Yet another rate fixup

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
40e1a6f09be0d487ce08e68e2bf9b0a01d771c8a 11-Jun-2009 Jens Axboe <jens.axboe@oracle.com> Improve rate limiting

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
29a90ddbe14d438463617e4629f7a9138854d466 10-Jun-2009 Jens Axboe <jens.axboe@oracle.com> Fix slat numbers

After commit 306ddc9752eef70c3fbb111af63d197a3a6d447f, it was logging
the blocksize since arguments 3 and 4 were switched.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
2cc529306ff529100449f9002978b271facb8380 09-Jun-2009 Jens Axboe <jens.axboe@oracle.com> Bad indent

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
581e71417760e0aa86eac0acd704253ff0eeea4f 09-Jun-2009 Jens Axboe <jens.axboe@oracle.com> Add support for limiting only rate in only one direction

So now you can say 'limit writes to 10MB/sec' and have reads go
full throttle, for instance.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
0a4957c60fb35db0973c15c4c2adbd3bac854ccd 03-Jun-2009 Jens Axboe <jens.axboe@oracle.com> Fix bug with rwmix and multiple loops over the same set

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
4f5af7b2370a6d3e64bc5128905c1aa8b0dc51b0 03-Jun-2009 Jens Axboe <jens.axboe@oracle.com> Cleanup verify headers

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
d6aed795f2e3e403828abf60874dd2d6e8342a1b 03-Jun-2009 Jens Axboe <jens.axboe@oracle.com> Clean up file flags

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
3bfb53dd20223015916e9ade388a5f9d49b87172 22-May-2009 Jens Axboe <jens.axboe@oracle.com> Remove io_u->endpos

It's only set in one location and never read.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
87c27b45f8d50720d7a9f12abc7e83d0a7463021 20-May-2009 Jens Axboe <jens.axboe@oracle.com> Clear f on error get_next_file_rr()

Otherwise we could return an invalid non-open file and trigger and
assertion failure later in the process.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
306ddc9752eef70c3fbb111af63d197a3a6d447f 18-May-2009 Jens Axboe <jens.axboe@oracle.com> Include transfer size in the clat/slat measurements

It's useful to know the block size that matches the given latency, so
add that to the end.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
c311cd2a9e3ca77f4d2cb2f6dd8bd08185e8c0f6 28-Apr-2009 Radha Ramachandran <radha@google.com> Don't populate random data for verify reads

I was seeing some performance drop during the read verification phase
of a test, and from the code in io_u.c in get_io_u function, we
prepare/populate the buffer in the io_u structure based on the verify
patterns/options.
This makes sense when we are doing writes, but I dont understand why
we do this for the read phase when this data is going to be
overwritten anyways(and in case of truncated reads, we do modify the
buf_len).
So based on that I changed the code to populate the buffer(io_u->buf)
only if its a write with verify enabled.
This works for my tests, but I do not know if there was a reason why
this was populated for reads as well to begin with.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
899c29f26080585dadab9ba35cd7ed01b26fb19b 22-Apr-2009 Radha Ramachandran <radha@google.com> Fix issue with random offset being off if io_size != real_file_size

get_next_free_block() would generate offset that were larger than the
requested size, either causing failures or just causing the test
to exit prematurely.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
720e84ad8292ab7b3a8e264fb00db71d796600d1 21-Apr-2009 Jens Axboe <jens.axboe@oracle.com> Add support for different weights for reads and writes with bssplit

You can now do:

bssplit=4k/20:8k/80,1k/50:4k/50

To have 20% 4k reads and 80% 8k reads, while having 50% 1k writes
and 50% 4k writes. This is identical to how the bs= option treats
reads and writes.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
5bfc35d7abe2582dc54127ca1d6e03792c9d62f5 07-Apr-2009 Jens Axboe <jens.axboe@oracle.com> Reseed random generator for loop/time based runs

Then we get repeatable 2nd/3rd/etc runs. This is important
if the file layout was random, otherwise subsequent runs will
get very different results.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
2b7a01d01ea19f6e4090c7a8280bc6bf983e781f 11-Mar-2009 Jens Axboe <jens.axboe@oracle.com> Add blockalign/ba option

Allows the job to specify alignment of the IO specifically, instead
of relying on using blocksize as the offset alignment.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
b5696bfc783ea3a762a73fa62d8b1a8d1fa67840 04-Mar-2009 Jens Axboe <jens.axboe@oracle.com> More file setting bug fixes

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
4bb997ce64df39b65c8d86c3b4a0504e6ab6eb48 04-Mar-2009 Jens Axboe <jens.axboe@oracle.com> Fix file open leak

Introduced by commit 87b10676354d10be02864ad615e1e9fe5a2376ab

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
87b10676354d10be02864ad615e1e9fe5a2376ab 04-Mar-2009 Jens Axboe <jens.axboe@oracle.com> Fix bug with openfiles

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
683023e8e29e99f9d5cbd255b8595917cd7ce4fc 04-Mar-2009 Jens Axboe <jens.axboe@oracle.com> Fix bug in file selection

We need to check both the OPEN and CLOSING flag, since CLOSE will not
be set until the file has really been closed.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
a086c25771b195d04651d293f299f0a63f7d2a23 04-Mar-2009 Jens Axboe <jens.axboe@oracle.com> Add 'sequential' file_service_type

This service type will keep a file open until IO to it is completely
done, before moving on to the next available file.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
dbad30b097de39d355b3952a3bb6db9ccf9dd77f 05-Dec-2008 Jens Axboe <jens.axboe@oracle.com> Fix bogus 'may be used uninitialized' warning from older gcc versions

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
993bf48b48f2d9724afa3698a15070e77bc5d1c0 14-Nov-2008 Jens Axboe <jens.axboe@oracle.com> Add gtod_reduce option

This cuts down even more on gtod() calls. While the three disable_X
options halved the gettimeofday() call count, this can reduce it to
less than 1 percent of what it otherwise would have been.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
9520ebb9f4dd88d086e313ae97e37ebb6d4f240b 16-Oct-2008 Jens Axboe <jens.axboe@oracle.com> Add options for disabling slat/clat/bw measurements

Useful for cutting down on the number of gettimeofday calls in
situations where that does impact performance. This is mostly for
really high IOPS rates.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
62977e09a378a713b31d64c63e15adcf9f6f9d9d 16-Oct-2008 Jens Axboe <jens.axboe@oracle.com> Kill io_u timeout handling

It has never been enabled, get rid of it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
b29ee5b3dee417016164198fb240344ef666de2b 11-Sep-2008 Jens Axboe <jens.axboe@oracle.com> Update ramp_time

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
721938ae7fae0f6d470a7e32e177ea5dce480229 10-Sep-2008 Jens Axboe <jens.axboe@oracle.com> Add ramp_time option

Sometimes it's useful to let a job settle for a little while
before taking any measurements on latency and throughput, since
the initial rate on eg a write workload may be much higher than
the longer sustained rate.

So add a ramp_time option that allows the user to specify a lead
ramp time that must have passed before fio takes any performance
numbers into account.

Suggested by "Jenkins, Lee" <Lee.Jenkins@hp.com>

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
f3f552b9920cc45c5b1f9c679f36b8ddb13927d0 13-Jun-2008 Jens Axboe <jens.axboe@oracle.com> Add uninitialized_var() to silence bogus compiler warnings

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
f3059de171cf9afd8b4968a681dcd1738f82bc6f 11-Jun-2008 Jens Axboe <jens.axboe@oracle.com> Improve bsrange buflen generations

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
4950421a7e379ba0ca642390ae4ae7b68e92a42f 05-Jun-2008 Jens Axboe <jens.axboe@oracle.com> Add iodepth_batch_complete control

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
dc873b6f4a536c332b72cce268d5a7ccd356a891 04-Jun-2008 Jens Axboe <jens.axboe@oracle.com> Add OS agnostic RAND_MAX

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
6162f5249479e4be69bcd0c0bf09d1c09ea99523 04-Jun-2008 Jens Axboe <jens.axboe@oracle.com> Missing time store in rwmix switch

Caused missing display of either read or write direction for a mixed
workload.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
01743ee1718e7ec4b16ae3e53c8f64900c6052cc 02-Jun-2008 Jens Axboe <jens.axboe@oracle.com> Rename list_* function and file to flist_ to avoid conflict with FreeBSD

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
8b113b4f2975f9edf4542d2e0f6d876dd89d1b8c 02-Jun-2008 Jens Axboe <jens.axboe@oracle.com> Do at least one block if randommap fails us

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
c9dd34b291ad747804040cb2bb60127e6afcc3fa 02-Jun-2008 Jens Axboe <jens.axboe@oracle.com> Inc block in mark_random_map()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
3e3357b1a54ca27c4b1f5e9564eee73f510e164f 02-Jun-2008 Jens Axboe <jens.axboe@oracle.com> Speedup mark_random_map()

Do each int at the time, not each bit.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
8f7e39dd35a40d088a31f33f12402a1eaf31b2c4 01-Jun-2008 Jens Axboe <jens.axboe@oracle.com> Readd the arch ffz functions

May as well use the single op version if we have them, it's
generally a lot faster than the generic_ffz()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
de605666880852ba9d1a0469723126b09782c520 31-May-2008 Jens Axboe <jens.axboe@oracle.com> ffz() takes ints, so change the file_map to being int based

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
697a606cc0af1c39ac18998c344a522199accb36 31-May-2008 Jens Axboe <jens.axboe@oracle.com> Add sparc and sparc64 support

Also get rid of the arch private ffz functions, the generic
one is just fine.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
465221b0121f5cf70585d7338c6448ac4b251257 30-May-2008 Jens Axboe <jens.axboe@oracle.com> Add dprint() to io_u requeue

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
e4dad9c614d7f6842b0efefbae3ca0fa540cad0a 28-May-2008 Jens Axboe <jens.axboe@oracle.com> Fix refill buffers overwriting verify data

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
04c540d9504fa81608952d6e2ce6b47066d2566c 28-May-2008 Jens Axboe <jens.axboe@oracle.com> Fixup distribution of reads and writes in a mixed workload

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
fc4398fdf45b76c3aa11e14e78fc41a1fb42eb7e 23-May-2008 Jens Axboe <jens.axboe@oracle.com> Silence warning on older gcc (bogus)

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
d9dd70f7e3d64ea764f182f152626d895841277c 23-May-2008 Jens Axboe <jens.axboe@oracle.com> Work-around too large block count

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
838bc709279964bdcc64070d4eb2777a0f79bcbb 22-May-2008 Jens Axboe <jens.axboe@oracle.com> Add logging for queue submit and complet counts

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
5973cafb37fbf24c3ca2cdf86a3d03f1b00d6d2b 21-May-2008 Jens Axboe <jens.axboe@oracle.com> Add option for refilling IO buffers on each submit

If the device looks at whether the data changed, then this can
make a difference.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
60f2c658b923afdd491d556e15a655584b9db306 16-May-2008 Jens Axboe <jens.axboe@oracle.com> Silence put_file() complaint

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
009bd847b5aeaca78e76de3a7066fe7d507a735f 15-May-2008 Jens Axboe <jens.axboe@oracle.com> Fix bad interaction with file open/close and queuing

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
d8005759746a2cb5c8269201911b1997aa714e80 15-May-2008 Jens Axboe <jens.axboe@oracle.com> Improve iodepth logging

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
67778e88b56f599cc43afbf471eecf179d3c98b1 15-May-2008 Jens Axboe <jens.axboe@oracle.com> Fix off-by-one in last_block()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
3bec7ae05cbec8823943a9aca79871c99709ed5f 14-May-2008 Jens Axboe <jens.axboe@oracle.com> Allow marking of queue depth for more than 1 io_u at the time

Same code as before, just prepared for it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
aec2de209564a6951e6c91d653fc99a75508607d 24-Apr-2008 Jens Axboe <jens.axboe@oracle.com> Kill unused parameters

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
e4928662a8a1674debae803d5ec4dcbdce7a3ddc 07-Apr-2008 Jens Axboe <jens.axboe@oracle.com> Base the rwmix switch algorithm on io issues

The time based switch can be unfair sometimes, so just simplify it a bit
and use issues only.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
303032ae4e13c7ac10b8198c40df98d95a4524a6 26-Mar-2008 Jens Axboe <jens.axboe@oracle.com> Allow randommap allocation to fail

It's not that critical, so just print a warning and continue
without randommap.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
5ec10eaad3b09875b91e19a20bbdfa06f2117562 06-Mar-2008 Jens Axboe <jens.axboe@oracle.com> Style fixups

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
4d4e80f2b4260f2c8b37a8612ce655502a799f7a 04-Mar-2008 Jens Axboe <jens.axboe@oracle.com> Revamp file locking

Get rid of the semaphore implementation, no need to carry both.
Add different locking modes (exclusive and readwrite) to enable
a wider range of testing. Also combine lockfile and lockfile_batch,
the latter is now a postfix option to the former.

So to enable readers-excluding-writers locking mode with a lock batch
count of 4, you would write:

lockfile=readwrite:4

instead.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
b2bd2bd96a09540b3add0ec74db2cdb1c145ca33 01-Mar-2008 Jens Axboe <jens.axboe@oracle.com> Add file locking hooks

Does nothing so far, but adds locking calls that cover from ->prep()
to after ->queue(). That is the period where we do IO.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
f85ac25a7d5c9d5ba4d5c73363a6a2a461a9b013 01-Mar-2008 Jens Axboe <jens.axboe@oracle.com> Remove the file->last_completed_pos variable

This tracks where we last did IO to this file, however with file
sharing that may break. So just remove this optimization, it'll
cost an extra lseek() for the sync engine but doesn't do much else
outside of that.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
126d65c6fc97d6acdc568aa5a969c012018daf15 01-Mar-2008 Jens Axboe <jens.axboe@oracle.com> Make file structures dynamically allocated

Current td->files is an array of files, make it an array of pointers
instead and allocate individual file structures on the fly. This is
a preparation patch for file sharing.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
6977bcd0e4ee3faa7ffd8f208e4031bdf906ed88 01-Mar-2008 Jens Axboe <jens.axboe@oracle.com> Update close file handler to return potential error

Filesystems like NFS do return errors on close(), up until now we
have been ignoring them. Fix that. Adjust io_ops engine version
to 9, since this is an API change.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
6ac7a3310ff8c21bb563939c8accec8c0d609109 01-Mar-2008 Jens Axboe <jens.axboe@oracle.com> When retrieving a requeued IO, don't setup data pointers again

This is a bug, if we had a residual data count we would be
retrying the full request again.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
84422acde41c9cf462245de115d425cf5a82124c 19-Feb-2008 Jens Axboe <jens.axboe@oracle.com> More random fixes

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
51b6996ea57913166a7cd5d777d1c1647a65731b 18-Feb-2008 Jens Axboe <jens.axboe@oracle.com> Fix typo in mark_random_map()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
b9c5b64452f483162cf9841cbdd44db6b72fd67c 18-Feb-2008 Jens Axboe <jens.axboe@oracle.com> Fix random location generation with offset != 0

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
4ba66134744885e676167dede2f5900512834a31 05-Feb-2008 Jens Axboe <jens.axboe@oracle.com> Fix offset retrieval problem for read and write having different bs ranges

"Zhang, Yanmin" <yanmin_zhang@linux.intel.com> reported that fio got
stuck with a job file that had different read and write block size
ranges. The problem is that get_next_offset() didn't take the data
direction into account, so when it generated an offset close to the
end of the file, it may not have been legal for that data direction.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
e4f54adb2aa0aec54f92f3e67eb7353e229bef95 04-Feb-2008 Jens Axboe <jens.axboe@oracle.com> Decrement io_issue count when requeuing an io_u

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
b271fe62101e84cd6ca2a78c92299beba251db24 04-Feb-2008 Jens Axboe <jens.axboe@oracle.com> Add debug trace for io_u_queue_complete()

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
d0656a93fbacc0cf0d6f405407b55b768affa949 01-Feb-2008 Jens Axboe <jens.axboe@oracle.com> CPU burn engine fix

It's ok to have zero buflen, if we are not doing real IO.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
2ba1c290d09af6d630d84a58b97b8032f73bc2ce 01-Feb-2008 Jens Axboe <jens.axboe@oracle.com> A bunch of fixes

Really should have been split up, but...

- Check this_io_bytes at the bottom of do_io() so that async engines
have a chance to queue pending IO before deeming this job done.

- dprint() should use log_info(), may not be stdout we want.

- last block bug in get_next_free_block(), if max blocks wasn't a
multiple of the bitmap size.

- Add more debug points.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
259693e9be3abfcb4a2bb28f4a0d02fb24393912 31-Jan-2008 Jens Axboe <jens.axboe@oracle.com> Merge branch 'master' of ssh://router/data/git/fio
d9d91e39df9cdc02d17c7b6831e2408ed1faa432 31-Jan-2008 Jens Axboe <jens.axboe@oracle.com> Fix wrong accouning of zone bytes

Ryan Thomas <Ryan.Thomas@nuance.com> writes:

**********

With the following job description

[global]
bs=1k
direct=1
rw=read
ioengine=libaio
iodepth=2
zonesize=1k
zoneskip=1023k
write_bw_log

[/dev/cciss/c0d1]
write_iolog=foo2

The idea here is that I wanted to line up my zones to start at 1M
boundaries across the disk by writing 1k and skipping the next 1023k.
In practice I don't get the alignment because of an extra initial I/O.
I get an iolog that looks like

fio version 2 iolog
/dev/cciss/c0d1 add
/dev/cciss/c0d1 open
/dev/cciss/c0d1 read 0 1024
/dev/cciss/c0d1 read 1024 1024
/dev/cciss/c0d1 read 1049600 1024
/dev/cciss/c0d1 read 2098176 1024

There's a read that I don't expect in that log, namely the read starting
at byte 1024. Because that read is there, the disk zones get offset by
one block. I expected output like

fio version 2 iolog
/dev/cciss/c0d1 add
/dev/cciss/c0d1 open
/dev/cciss/c0d1 read 0 1024
/dev/cciss/c0d1 read 1048576 1024
/dev/cciss/c0d1 read 2097152 1024
/dev/cciss/c0d1 read 3145728 1024

***********

The problem is due to the fact that fio account zone_bytes when the IO
completes, which is clearly not correct for io depth > 1. So move the
accounting to when we fill the io_u instead.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
273f8c912d981439049d9b21aa048aaeaa323c5d 25-Jan-2008 Jens Axboe <jens.axboe@oracle.com> Random IO fixes

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
564ca97254984165e06d5fd4b1270bac95ca55fb 14-Dec-2007 Jens Axboe <jens.axboe@oracle.com> Add support for 'bssplit' option, fine grained block size contrl

From the HOWTO addition:

bssplit=str Sometimes you want even finer grained control of the
block sizes issued, not just an even split between them.
This option allows you to weight various block sizes,
so that you are able to define a specific amount of
block sizes issued. The format for this option is:

bssplit=blocksize/percentage:blocksize/percentage

for as many block sizes as needed. So if you want to define
a workload that has 50% 64k blocks, 10% 4k blocks, and
40% 32k blocks, you would write:

bssplit=4k/10:64k/50:32k/40

Ordering does not matter. If the percentage is left blank,
fio will fill in the remaining values evenly. So a bssplit
option like this one:

bssplit=4k/50:1k/:32k/

would have 50% 4k ios, and 25% 1k and 32k ios. The percentages
always add up to 100, if bssplit is given a range that adds
up to more, it will error out.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
8670579ed3a063723f194e6fec8250bec4d8ea25 21-Nov-2007 Shawn Lewis <shawnlewis@google.com> don't log iopiece when do_verify is off

Don't log an iopiece if do_verify is off. This allows us to do large write
phases (with verify headers) without using a lot of memory.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
b4c5e1acb5a7964f858e2b41c1ae07b1afc0f4ea 25-Oct-2007 Jens Axboe <jens.axboe@oracle.com> More cpu engine fixes

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
81887d5dcd608492e59ed3fb2ac8fcb463223120 07-Sep-2007 Jens Axboe <jens.axboe@oracle.com> splice: update to new vmsplice-to-user interface

I changed the kernel bits (they aren't merged yet), so update
the fio splice engine to reflect that.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
061c86982ea02651cab2239b12983dd382019f26 04-Sep-2007 Jens Axboe <jens.axboe@oracle.com> Add unmap hook that belongs to the IO engines

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
bcdedd0ac6e9413258b608ecb3511867b1a9c534 27-Jul-2007 ljzhang,Yaxin Hu,Jianchao Tang <nonggia@sjtu.edu.cn> [PATCH] Fix fileoffset option

1. The job file we prepared:
----------offset-----------------
[global]
filename=./temp/HOWTO
nrfiles=1
rw=read
size=8K
offset=16k
bs=1k
thread
loops=10
[offset]
description="Option 'offset' doesn't work."
---------------------------------
Besides, we copied the file HOWTO to the directory ./temp/.
So we thought fio would read 8K text sequentially from the point 16K off
the beginning of HOWTO.

we run fio with gdb to see what was read out after the first io, and we
got this:
---------------------------------
... ...
(gdb) bt
from /lib/tls/i686/cmov/libpthread.so.0
(gdb) x/4w io_u->xfer_buf
0x8073f08: 0x6c626154 0x666f2065 0x6e6f6320
0x746e6574
(gdb)
---------------------------------
The above was performed after the first io finished by td_io_queue.
The contents read out as we can see was the ASCII codes for 'Table of
content', which was right from the beginning of file HOWTO.
That means fio read from the beginning but not the point 16K off the
beginning.Is that right?

2. Reason for the problem:
It seems the offset is saved in td->o.start_offset. But it isn't passed
to f->file_offset.And the setting up of f->io_size doesn't refer to
f->file_offset.

--------------------------------------------------------

And now we can check it with gdb:
--------------------------------------------------------
... ...
(gdb) bt
from /lib/tls/i686/cmov/libpthread.so.0
(gdb) x/4w io_u->xfer_buf
0x8073f08: 0x206b636f 0x7420666f 0x66206568
0x20656c69
(gdb)
---------------------------------------------------------
After the first io, I got '0x206b636f 0x7420666f 0x66206568 0x20656c69'
read out.And they represent the string 'ock of the file '.Then i search
the string in HOWTO and got only one line containing the string:
'norandommap Normally fio will cover every block of the file when doing'
I removed the text following that line in HOWTO, and then I found that
the size of the rest text in HOWTO was 16K, which equaled to the offset
we set in job file.
So I think the option 'offset' does work after the changes.

In fact, I am not sure of the fix, but i do hope it can help.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
0c3d768a44543dd6c23337eafc726e7f88dc3076 26-Jul-2007 ljzhang,Yaxin Hu,Jianchao Tang <nonggia@sjtu.edu.cn> [PATCH] non-stop thread

1. The job file causing the problem:
-------------------rw-------------------
[global]
directory=./temp
nrfiles=1
rw=randread:8
norandommap
size=32k
bs=2k
thread
[rw]
description="Offset over real file size."
-----------------------------------------

The job file can keep fio running with the eta increasing and the
progress pausing like this:
----------------------------------------
rw: (g=0): rw=randread, bs=2K-2K/2K-2K, ioengine=sync, iodepth=1
Starting 1 thread
Jobs: 1 (f=1): [r] [92.3% done] [ 0/ 0 kb/s] [eta 00m:01s]]

----------------------------------------

If we force it to stop, it prints like this:
--------------------------------------------
fio: terminating on signal 2

rw: (groupid=0, jobs=1): err= 0: pid=6124
Description : ["Offset over real file size."]
read : io=28KiB, bw=0KiB/s, iops=0, runt= 61900msec
clat (usec): min= 5, max= 436, avg=87.79, stdev=123.71
cpu : usr=2.01%, sys=93.48%, ctx=13644
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
>=64=0.0%
issued r/w: total=14/0, short=0/0
lat (usec): 10=42.86%, 100=35.71%, 250=7.14%, 500=14.29%

Run status group 0 (all jobs):
READ: io=28KiB, aggrb=0KiB/s, minb=0KiB/s, maxb=0KiB/s,
mint=61900msec, maxt=61900msec

Disk stats (read/write):
sda: ios=8/45, merge=0/40, ticks=4/368, in_queue=372, util=0.27%
--------------------------------------------
>From above we can see an uncompleted job with a io 28KiB less than what
is specified by 'size'.

2. Reason for problem:
After looking into the source codes,We guess the problem comes from the
function get_next_offset().If the io reaches the end of the file, the
function fails, and the file will be marked as DONE.We wonder if that is
the planned behavior.Isn't it very common to reach the file's end when
doing a random io?

3. Fix suggestion:
Here is the patch:
-----------------------------------------------------
diff -Nraup fio-7.25/io_u.c fio-7.25-rw/io_u.c
--- fio-7.25/io_u.c 2007-07-25 14:25:05.000000000 +0800
+++ fio-7.25-rw/io_u.c 2007-07-26 09:55:22.000000000 +0800
@@ -162,10 +162,12 @@ static int get_next_offset(struct thread
if (get_next_rand_offset(td, f, ddir, &b))
return 1;
} else {
- if (f->last_pos >= f->real_file_size)
- return 1;
-
- b = f->last_pos / td->o.min_bs[ddir];
+ if (f->last_pos >= f->real_file_size) {
+ if (!td_random(td) || get_next_rand_offset(td, f, ddir, &b))
+ return 1;
+ } else {
+ b = f->last_pos / td->o.min_bs[ddir];
+ }
}

io_u->offset = (b * td->o.min_bs[ddir]) + f->file_offset;
------------------------------------------------------

After applying that, we got the job file run to the end normally:
-------------------------------------------------------
nonggia@nonggia-desktop:~/fio$ ./rw_fio rw
rw: (g=0): rw=randread, bs=2K-2K/2K-2K, ioengine=sync, iodepth=1
Starting 1 thread

rw: (groupid=0, jobs=1): err= 0: pid=6519
Description : ["Offset over real file size."]
read : io=32KiB, bw=1560KiB/s, iops=761, runt= 21msec
clat (usec): min= 5, max=14251, avg=1293.50, stdev=3510.37
cpu : usr=0.00%, sys=19.05%, ctx=7
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
>=64=0.0%
issued r/w: total=16/0, short=0/0
lat (usec): 10=37.50%, 20=12.50%, 250=12.50%, 750=6.25%, 1000=6.25%
lat (msec): 2=18.75%, 20=6.25%

Run status group 0 (all jobs):
READ: io=32KiB, aggrb=1560KiB/s, minb=1560KiB/s, maxb=1560KiB/s,
mint=21msec, maxt=21msec

Disk stats (read/write):
sda: ios=8/0, merge=0/0, ticks=20/0, in_queue=20, util=13.89%
-------------------------------------------------------

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
b6a4c7d152075209ba84ca05c32154427cbcd275 26-Jul-2007 ljzhang,Yaxin Hu,Jianchao Tang <nonggia@sjtu.edu.cn> [PATCH] Random map block coverage

1. The job file causing the problem:
----------cover-------------------
[global]
directory=./temp
nrfiles=1
rw=randread
size=256K
bsrange=4k-16k
thread
[cover]
description="Not covering every block."
-----------------------------------------

According to HOWTO,the job file will makes fio to cover every block of
the 256k file.But running that, we sometimes got a io gross more than
256k:
----------------------------------------
nonggia@nonggia-desktop:~$ fio --version
fio 1.16.9
nonggia@nonggia-desktop:~/fio$ fio cover
cover: (g=0): rw=randread, bs=4K-16K/4K-4K, ioengine=sync, iodepth=1
Starting 1 thread

cover: (groupid=0, jobs=1): err= 0: pid=6969
Description : ["Not covering every block."]
read : io=264KiB, bw=90112KiB/s, iops=7666, runt= 3msec
clat (usec): min= 66, max= 438, avg=151.00, stdev=88.90
cpu : usr=0.00%, sys=133.33%, ctx=0
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
>=64=0.0%
issued r/w: total=23/0, short=0/0
lat (usec): 100=34.78%, 250=56.52%, 500=8.70%

Run status group 0 (all jobs):
READ: io=264KiB, aggrb=90112KiB/s, minb=90112KiB/s, maxb=90112KiB/s,
mint=3msec, maxt=3msec

Disk stats (read/write):
sda: ios=49/0, merge=0/0, ticks=4/0, in_queue=4, util=2.86%
--------------------------------------------

It seems fio doesn't cover every block.And using gdb we can see it in
detail:
--------------------------------------------
(gdb) where
from /lib/tls/i686/cmov/libpthread.so.0
(gdb) p td->files[0].num_maps
$1 = 2
(gdb) x/2w td->files[0].file_map
0x8073ff0: 0x00000000 0x00000000
(gdb) finish
Run till exit from #0 do_io (td=0xb7bec000) at fio.c:423
thread_main (data=0xb7bec000) at fio.c:875 0 kb/s] [eta 00m:00s]
875 clear_state = 1;
(gdb) x/2w td->files[0].file_map
0x8073ff0: 0xffffeffd 0x7ce2df47
(gdb) c
Continuing.
[Thread -1212236896 (LWP 7099) exited]

cover: (groupid=0, jobs=1): err= 0: pid=7098
Description : ["Not covering every block."]
read : io=264KiB, bw=7KiB/s, iops=0, runt= 37522msec
clat (usec): min= 67, max= 347, avg=143.28, stdev=67.59
bw (KiB/s) : min= 0, max= 0, per=0.00%, avg= 0.00, stdev= 0.00
cpu : usr=0.00%, sys=0.01%, ctx=13
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
>=64=0.0%
issued r/w: total=29/0, short=0/0
lat (usec): 100=31.03%, 250=62.07%, 500=6.90%

Run status group 0 (all jobs):
READ: io=264KiB, aggrb=7KiB/s, minb=7KiB/s, maxb=7KiB/s,
mint=37522msec, maxt=37522msec

Disk stats (read/write):
sda: ios=50/23, merge=0/32, ticks=0/160, in_queue=160, util=0.13%

Program exited normally.
--------------------------------------------------

2. Reason for problem:
We think when there is no 'norandommap' in the job file, and no ':int'
appended with 'rw',just like the job file above, fio is meant to use
only the blocks not covered yet.
But it seems in the function mark_random_map(), the condition before
calling random_map_free() will never be satisfied.

3. Fix suggestion:
Here is the patch:
-----------------------------------------------------
diff -Nraup fio-7.25/io_u.c fio-7.25-cover/io_u.c
--- fio-7.25/io_u.c 2007-07-25 14:25:05.000000000 +0800
+++ fio-7.25-cover/io_u.c 2007-07-25 20:43:58.000000000 +0800
@@ -55,7 +55,7 @@ static void mark_random_map(struct threa
* If we have a mixed random workload, we may
* encounter blocks we already did IO to.
*/
- if (!td->o.ddir_nr && !random_map_free(td, f, block))
+ if (td->o.ddir_nr==1 && !random_map_free(td, f, block))
break;

idx = RAND_MAP_IDX(td, f, block);
------------------------------------------------------

After that, we check it with gdb:
----------------------------------------------------
(gdb) where
from /lib/tls/i686/cmov/libpthread.so.0
(gdb) p td->files[0].num_maps
$2 = 2
(gdb) x/2w td->files[0].file_map
0x8073ff0: 0x00000000 0x00000000
(gdb) finish
Run till exit from #0 do_io (td=0xb7c48000) at fio.c:423
thread_main (data=0xb7c48000) at fio.c:875 0 kb/s] [eta 00m:00s]
875 clear_state = 1;
(gdb) x/2w td->files[0].file_map
0x8073ff0: 0xffffffff 0xffffffff
(gdb) c
Continuing.
[Thread -1212073056 (LWP 7443) exited] 5/ 0 kb/s] [eta 00m:00s]

cover: (groupid=0, jobs=1): err= 0: pid=7442
Description : ["Not covering every block."]
read : io=256KiB, bw=5KiB/s, iops=0, runt= 46612msec
clat (usec): min= 62, max= 522, avg=119.50, stdev=88.07
bw (KiB/s) : min= 0, max= 0, per=0.00%, avg= 0.00, stdev= 0.00
cpu : usr=0.00%, sys=0.01%, ctx=11
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%,
>=64=0.0%
issued r/w: total=38/0, short=0/0
lat (usec): 100=55.26%, 250=39.47%, 500=2.63%, 750=2.63%

Run status group 0 (all jobs):
READ: io=256KiB, aggrb=5KiB/s, minb=5KiB/s, maxb=5KiB/s,
mint=46612msec, maxt=46612msec

Disk stats (read/write):
sda: ios=64/45, merge=0/62, ticks=8/476, in_queue=484, util=0.19%

Program exited normally.
(gdb)
---------------------------------------------------------
Now we can see the expected '0xffffffff 0xffffffff' and the 'io=256KiB'.
By the way, we tested this both on a 32bit machine and a 64bit one.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
6a5e688425bb394946ef27134aa0f3de928c6a1f 26-Jul-2007 Jens Axboe <jens.axboe@oracle.com> Fix problem with io_u being beyond EOF

Bug report from "ljzhang,Yaxin Hu,Jianchao Tang" <nonggia@sjtu.edu.cn> :

1. The job file causing the problem:
----------ranmap-------------------
[global]
directory=./temp
nrfiles=1
rw=randread
size=64K
bsrange=1k-32k
thread
[ranmap]
description="Over-bounded in mark_random_map()."
-----------------------------------------

Running the job file, we have a high possibility to get a core dump like
this:
----------------------------------------
nonggia@nonggia-desktop:~/fio$ fio --version
fio 1.16.9
nonggia@nonggia-desktop:~/fio$ fio ranmap
ranmap: (g=0): rw=randread, bs=1K-32K/4K-4K, ioengine=sync, iodepth=1
Starting 1 thread
file:io_u.c:64, assert idx < f->num_maps failed
Segmentation fault (core dumped)
nonggia@nonggia-desktop:~/fio$ gdb fio core.6135
... ...
Core was generated by `fio ranmap'.
Program terminated with signal 11, Segmentation fault.
io_u.c:64
64 fio_assert(td, idx < f->num_maps);
(gdb) bt
io_u.c:64
io_u.c:348
io_u.c:588
from /lib/tls/i686/cmov/libpthread.so.0
(gdb) p io_u->offset
$1 = 41984
(gdb) p io_u->buflen
$2 = 27648
(gdb) p io_u->file->real_file_size
$3 = 65536

2. Reason for the core dump:
The io_u->offset+io_u->buflen was too large to be map in the map file.
They just produced an idx out of the file_map's range.

The fix I produced made sure that get_next_buflen() doesn't go
beyond the real file size, by shrinking the buflen.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
429f6675446eec26652b010b0c715d8bb6bc32e1 23-Jul-2007 Jens Axboe <jens.axboe@oracle.com> IO log fixes

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
f29b25a370598d387e539c3dcae126274c6cbf4d 23-Jul-2007 Jens Axboe <jens.axboe@oracle.com> Add version 2 of the iolog format

The old format had some short comings - notably not supporting > 1
file workloads. So add a new format that defines adding/open/close
of files. Fio will still load the older format iologs, but the new
ones wont work on older fio versions.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
48f5abd393cc614e1984391b28ba491ef9b26f5e 20-Jul-2007 Jens Axboe <jens.axboe@oracle.com> Fix disk zone test case

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
04a0feae73ca50d05914cc3c425b2a6949523204 19-Jun-2007 Jens Axboe <jens.axboe@oracle.com> Adaptive io latency distrobution "histogram"

Log ranges all the way down to microseconds, and display the most
appropriate values for those ranges.

This makes the latency usable for sub-milisecond devices as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
a783e61aadbdd51ea69b8c62a3cbe0897b739123 19-Jun-2007 Jens Axboe <jens.axboe@oracle.com> io_u_mark_depth: just set index, don't fall through

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
d85f5118c41a112c3b8a58cc6908d00294bfb78d 18-Jun-2007 Jens Axboe <jens.axboe@oracle.com> Make completion and submission latency use appropriate time base

It's hardcoded as msecs right now, switch the accounting to usecs
and print out the appropriate base determined by the value range.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
97af62cec418cd722fb43c6010d6430534e12353 22-May-2007 Jens Axboe <jens.axboe@oracle.com> IO verification needs to open and grab a reference to a file

Otherwise it can disappear in midair.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
43c63a78d3f902b4bf941841579834bbfabd5c62 21-May-2007 Jens Axboe <jens.axboe@oracle.com> Improve random pattern without norandommap

Using the random map, random workloads have a natural tendency to
get less random at the end of the run, due to failures to find a
new unused random offset.

Improve the logic to avoid this problem.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
b12ebc65e82de1cc6174b65c79266dd0f0a4fbf3 21-May-2007 Jens Axboe <jens.axboe@oracle.com> Rename ffz() function to fio_ffz() to avoid conflicts

Newer gcc/glibc include an ffz function. Lets just do the easy
thing and rename ours to fio_ffz(), then we can look into reusing
a provided one later if necessary.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
2dbdab7e8fb0205c471f72effab1b2ae5f19bfac 26-Apr-2007 Jens Axboe <jens.axboe@oracle.com> Fix bug with file references

This could cause premature exit of fio with an error at the end of
the run.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
fcb11708806c026566f2af58833ea919419a066d 25-Apr-2007 Jens Axboe <jens.axboe@oracle.com> Fix read_iolog

Caveat - it only works with 1 file, unfortunately. Will need a format
change to get that right.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
660a1cb5fb9843ec09a04337714e78d63cd557e7 17-Apr-2007 Jens Axboe <jens.axboe@oracle.com> Reduntant write bit checks

No point in checking for td_rw(td) || td_write(), since td_write()
will also be true for td_rw().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
d460eb318f784876812bedfed382afb00e57c62a 16-Apr-2007 Jens Axboe <jens.axboe@oracle.com> Fix problem with f->last_completed_pos not being correct on requeues

This causes an unnecessary seek. Usually this is just noise, but if
the device isn't seekable, it becomes a real problem.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
317b95d07d4921d2594a1be6e014c9c2d062fe75 02-Apr-2007 Jens Axboe <jens.axboe@oracle.com> Move os/arch/compiler headers into directories

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
1020a139beff50faf1bb18f761b024b664a09e14 29-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Fix loop with multiple files

The random lookup would loop infinitely, if no files were
open. So check for that and check for number of files
done.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
8400d9b26a4f24f3b56cc9dad02be65791b58a83 28-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Fix short IO handling for verifies as well

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
5a7c56804dafab5770797044a4f1d259fe708dfb 28-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Handle short read at the end of file

Currently we don't issue an io operation if offset + buflen
is larger than the file size, but that means we don't reach
the last bit of a file if the size isn't block size aligned.
Instead handle a short read properly. It actually cleans up
the code as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
d5ed68ea91e3f6a6b366cc2dcf2b1e7b9ce2b8d0 28-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Fix infinite loop in get_next_file_rr()

We need to clear f to NULL before doing a continue on FIO_FILE_DONE.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
059e63c02b947085d28ec7c6450b51d5fb2e8d05 27-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Better check for not doing a file twice

Mark it as done when we close it, so we don't open the same
one again.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
43063a1c8288d987eb9c14e2736b3b857836def6 27-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Fix bug with not noticing end of file

We repeatedly re-read the last end of a file, instead of skipping
to a new one. The problem was that the offset got turned into a
block number for comparison, so we would screw up if size % bs.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
7bb48f84ac78cac1f90e3e04d0220d90d6a64a6b 27-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Revamp the file creation code

This was long overdue, it's much simpler now and hopefully
less bug prone. Probably a few stray bugs here and there
that needs straightening out, but the end result should
be a lot better.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
c38e946828472daf5cd0450401a7aba06cda7f60 27-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Include syncs in the stored io log

We want to replay those as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
8fd15a9a8d64deae4c2f13b02e1df7e23ea3cafb 27-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Remove !td->o.read_io_log test that is always true

We test it further up.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
41128405394ccb8dc43080c50288a86b5faa1486 27-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Only call into log_io_piece() when verify is set

Don't know why it currently always logs the IO, it's pretty
pointless.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
36690c9b5b50736cec1fcd53100f01fd1181fdf4 26-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Add 'null' verify option

For testing purposes.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
ec4015da5b2abd814a23913db2aa2385a2b13495 23-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Cleanup get_next_offset()

Split into two parts, one for generation a random offset, and one
for just setting a new sequential offset.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
1e3d53acf28f1b61222eec244a67fad42f9a060d 22-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Improve mixed random append option

If we set ->ddir_nr to o.ddir_nr initally, we can remove the double
else in get_next_offset().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
211097b2aa664b8c157692a1e2fe656ed4a3488c 22-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Add support for mixing a random IO workload a bit

Now you can append a number to randread/randwrite (and others) to
specify only getting a random offset for every X number of ios.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
4d06a3384c0bf34d217fa942d85dc70dfc282da9 22-Mar-2007 Davide Libenzi <davidel@xmailserver.org> Avoid "ts" going out of scope.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
38d77caebcb6f9cb33f247a341c162c0185bf604 21-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Improve data direction runtime logging

If we cut a data direction short, log that time so we don't
account the full runtime.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
e47f799f567508835b60675ed659c97f78e7cc94 21-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Improve rwmix states

We didn't use to look at the previous bytes done for the
data directions, which skewed the mix for buffered IO.
Fix that up.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
afe24a5a66350a3828e8965f7b189fc95b8bbf6c 16-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Improve rwmix buffered split

For buffered IO, the rwmix split can often be grossly unfair
towards reads, because dirtying tons of memory is done much
faster than reading data. Improve the split for such workloads
by not only looking at time.

Note that it'll still be somewhat unfair, there's only so much
we can reliably do. But it's better.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
15506d09caa78df3e36a6bab05cdf12092f2d507 15-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Compile error with FIO_USE_TIMEOUT defined

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
2dc1bbeb58edc85f2829eed6729862c438ea2353 15-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Move thread options into a seperate structure

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
2393acbabe0f290da2d8f02c6ac0c1edf6ddb08a 14-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Fix for bs shrinkage

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
4981d2de251698ebbe78451bfe4615e0d09a5296 14-Mar-2007 Jens Axboe <jens.axboe@oracle.com> When opening a new file, check file limit not total number

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
e291dc123a8a6eaaa6a45b52aed947dfa80834f2 13-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Fix double io_u free in error path

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
5afa0d9b2e14194d34001a24007d96536608e651 13-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Obscure file randommap fix

If file size < block and no size is given, we could be generating
a random offset within -1 and deref ->file_map[] beyond its size.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
1c17818009ced8e78e9fee47fd9aaef29e708b41 13-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Improve handling of nr_files != open_files

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
0ad920e7f85db1fdc26649be6bc7e584e8c7fdc9 13-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Add file reference counting

We must not close a file, while io is in progress to it. That
will make the queuing engines barf.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
f11bd94d50d5995a64682f74b5f0f7509bf2c550 13-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Turn file ->open and ->unlink into flags

We'll need more flags in the next commits, so do this as a
preparatory patch.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
b3605062146bce0136918763bb8eb584478ae042 12-Mar-2007 Jens Axboe <jens.axboe@oracle.com> Show IOPS as well as bw numbers

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
1907dbc6c0c9e1b663156e64c64c172aaf04ae8a 12-Mar-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
a978ba684deb758465a0ccb18a008797636e8054 08-Mar-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
860a3044085c676632f9832a78133cd9847cbe62 08-Mar-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
e6433576b85eb28d32fe099b38ea64ac006b4b74 08-Mar-2007 Jens Axboe <jens.axboe@oracle.com> get_next_offset() number of loops change

Commit b5af82930ccfd7dda6a1b11794efb452eb76d8dc inadvertently
changed this, revert.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
76579cae25b7e2cdf931f909725665ec45404f2a 08-Mar-2007 Jens Axboe <jens.axboe@oracle.com> file_service_type=random fix

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

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
b5af82930ccfd7dda6a1b11794efb452eb76d8dc 08-Mar-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
756867bd127cfa1fb27ae2d4ba973af8cb341f13 06-Mar-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
b2560f3ca4677e2908fc4111f4d04fae5df3b229 06-Mar-2007 Jens Axboe <jens.axboe@oracle.com> One step closer to group reporting

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
5451792ecc9ec3507c222da00d90a8829013ed50 05-Mar-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
37e974a5eed8aafc6fc865b57e803837eebd3509 02-Mar-2007 Jens Axboe <jens.axboe@oracle.com> io_u completion error propagation

Make sure we definitely signal an endio error.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
7c83c089a9b8bd742f788157ac47a5af363adb19 01-Mar-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
bdb4e2e99d4a87e5d3677cc09aa1ce92135125a9 01-Mar-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
9bf2061e2b76a396936c5fe70060574a6c96b8f8 01-Mar-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
face81b280ab94ba5d975739578779157c8b54ce 26-Feb-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
4d2e0f49006af315ec8653008938bc51f2a0ddac 24-Feb-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
d7762cf829fd3e44e50e5e2e9889b6449772097c 23-Feb-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
413dd459a7710ba421061e840dd9ac3161c70f20 23-Feb-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
0aabe160c38efc3c42157fac2a9af08e070341c6 23-Feb-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
5945b9b45474a9a717a3db2310822aa5064fb38b 22-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Dump io_u on timeout

It's still disabled, though.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
e1161c325f7866bae879e686d1c673ca32ab09ae 22-Feb-2007 Jens Axboe <jens.axboe@oracle.com> 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>
/external/fio/io_u.c
55bc972818cdec46f47633da62758e4dcdb6f3f6 22-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Disable timeout handling for now

It needs to get some more testing. It appears to work fine, just
want to be a little cautious.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
433afcb4fe81e775c15af9d39a6f4db8a53d693a 22-Feb-2007 Jens Axboe <jens.axboe@oracle.com> io_u timeout handling

Further measures to prevent fio getting stuck, even in case of
engine timeout errors.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
0c6e75175bcaf8d05bfa88aa8caa584fbb848b74 22-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Track io_u state (free or in-flight)

That way we can catch proper use by fio, so we don't get stuck
in cleanup_pending_aio() if someone forgot to put_io_u() in an
error path.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
8abdce6686bfcaa211e7eb75a69ec07e980bd96e 21-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Change IO latency histogram to be in power-of-10

Power of 2 is just confusing for latencies, make the series
more natural by doing 1, 2, 4, 10, 20, 50, etc.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
e7e6cfb4f22b19de03aa5a0b031d4844dd8b1ebe 20-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Update io_u.c comments

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
7e77dd026d85253936aef432ba8f3e89b96b805c 20-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Improve submission latency calculation

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
00de55ef85f01f3c56fac5397aca92eef0c73762 20-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Use 0 timeout for command completion peek

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
77f392bf28b1eafbece08df6c066440a838499a1 19-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Be safe and re-prep requeue io_u's

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
afab5e46cf0a984a87426329b3157e38d9a419a4 19-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Fix busy looping for io_u_queued_complete()

If min_events > 0, don't set a 0 timeout or we'll end up
busy looping in the io engine getevents handler.

Just disable the timeout for now, perhaps we'll reuse it
in the future to prevent a thread from stalling too long
there.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
3d7c391dbdc56f261447b2d8ab65e74a42a20c41 19-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Retrieve next file to service in get_io_u()

This improves requeue handling, we don't want to inadvertently
skip a file because we requeue an io_u.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
755200a326a33e5e19b16dfd5e013dd98bcf1916 19-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Add support for queuing > 1 command at the time

For the async engines, we currently do queuing by issuing one
command at the the time. Improve this by adding a ->commit()
hook to complement the ->queue() hook. When ->queue() returns
FIO_Q_BUSY, call ->commit() to actually send off the io to the
kernel.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
9978463287982c2f73f171ec9a79979939dee47a 19-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Differentiate between bool error return and real error value

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
97601024a53586d77a368763f08be9ee483fdc9c 18-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Cleanup end IO handling

Abstract out the end IO handling, so that callers don't have to
keep track of completion details. Then we can make the
io_completion_data structure private to io_u, and just provide to
functions to end io - one for sync completes, one for queued completes.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
3af6ef399a9df324ffe4a8c8e03b52a42f587229 18-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Fully parallellize io_u verification

Keep a full queue whenever possible, do verifications while
io is in progress.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
36167d82e5f49dee91c6d2cd426068edee90e36f 18-Feb-2007 Jens Axboe <jens.axboe@oracle.com> Change IO engine queuing

Instead of always pretending to be async, let the IO engines
return FIO_Q_COMPLETED or FIO_Q_QUEUED to signal async or
sync completions regardless of their nature. This cleans up
the queuing model quite a bit.

Also fixed a verification error spotted while doing this
transformation.

The main intent of this is to allow queuing more than 1 piece
of IO at the time, that will come in a later changeset.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
ec1183049478cfc03ec3cc513ae07b7ca9a48140 17-Feb-2007 Jens Axboe <jens.axboe@oracle.com> [PATCH] IO completion time histograms

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
e9fbdd74f6ac24d93824177a8858c028305c9900 13-Feb-2007 Jens Axboe <jens.axboe@oracle.com> [PATCH] Woops, left debug clear in there

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
0032bf9fdccc4491e779a0c581c9bcb714b012f7 13-Feb-2007 Jens Axboe <jens.axboe@oracle.com> [PATCH] Add fio_assert()

A job must not call assert(), as it wont exit and set thread
state properly.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
07e4b620ecb7f64dc75ac288928f073fb42f4441 12-Feb-2007 Jens Axboe <jens.axboe@oracle.com> [PATCH] Fix buflen trimming

It's ok to trim to the minimum block size for RAWIO.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
bca4ed4de445a07af393ac8bfcb9dd6aad09e5df 12-Feb-2007 Jens Axboe <jens.axboe@oracle.com> [PATCH] One more round of random map fixes

The last fixes made sure that we don't generate a block >= file size,
but for io_u's that contain multiple blocks, it could still happen.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
c685b5b2912bfbd3cdc8729d16a98438b1ff7593 10-Feb-2007 Jens Axboe <jens.axboe@oracle.com> [PATCH] More random map fixes

Several optimizations and fixes:

- Add ->last_free_lookup as a cache for get_next_free_offset(). No point
in iterating known full blocks.
- Reduce number of random loops to 5 for random map lookups, fallback to
next free block instead of wasting cpu cycles. Was 50.
- get_next_free_block() needs to take file offset into account.
- Reverse order of retrieving buflen and offset, so we can trim
and mark properly.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
afdbe580a4c173cb90b079dc266229c6d4257911 10-Feb-2007 Jens Axboe <jens.axboe@oracle.com> [PATCH] Random map fix

mark_random_map() would give up too soon, causing an infinite loop
in the block allocation.

Reported by Randy Dunlap.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
165faf16657c17b924a84e5601e17a516c76c135 07-Feb-2007 Jens Axboe <jens.axboe@oracle.com> [PATCH] Misc fixes

- Change the hour/day eta display to be more clever.
- Style

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
cec6b55da1c282b5b91ad346c7804171fccf151e 06-Feb-2007 Jens Axboe <jens.axboe@oracle.com> [PATCH] Support residual io counts from io engines

We need this for requeuing support, the network engine makes this
pretty apparent (it's not unusual to see short tranfers there).

Basically we add an xfer_buf and xfer_buflen member to the io_u,
and these are the fields that the io engine MUST use. That allows
fio to increment and reset these appropriately, and simply requeue
the io_u for service of the next part of it.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
71619dc28506f7b7b40905b942e992b02f0d5b96 13-Jan-2007 Jens Axboe <jens.axboe@oracle.com> [PATCH] Include io depth distribution statistics

Calculate the distribution of io depths for the job run.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
ee88470c001012d08ae37bfc31741a935be2e7a1 20-Dec-2006 Jens Axboe <jens.axboe@oracle.com> [PATCH] Must use ->real_file_size

->file_size is the size of the file from offset, while ->real_file_size
is the total size of the file. So when comparing EOF, we should look
at ->real_file_size against the offset.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
1e97cce9f5a87a67293a05ec4533ed6968698b2e 05-Dec-2006 Jens Axboe <jens.axboe@oracle.com> [PATCH] Fix warnings from icc

icc spewed a bunch of warnings on building fio, but it did actually build
and work. Some of them are real bugs, most are just "helpful" warnings.

icc doesn't like pointer arithmetic, however these are not fixed up. It
works as-is, just ignore those class of warnings.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
02bcaa8c31feb93c61b701d143a7eea3efd2124d 24-Nov-2006 Jens Axboe <jens.axboe@oracle.com> [PATCH] Time and seek optimizations

We did too many gettimeofday() calls, this patch cuts the number by
40%. Use clock_gettime() MONOTONIC instead, it is faster on my system
at least.

This patch also optimizes calling lseek() only when necessary for the
sync io engine.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
f697125ab9003d358a37186d610e09799afd190f 15-Nov-2006 Jens Axboe <jens.axboe@oracle.com> [PATCH] nrfiles > 1 random fix

We should only generate a block within the specific file size, not
the total io size.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
a00735e66f9ec42549da94eba3170e543b542904 03-Nov-2006 Jens Axboe <jens.axboe@oracle.com> [PATCH] Add seperate read/write block size options

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
690adba373bb8c97a365c67da369e265953c4b4c 30-Oct-2006 Jens Axboe <jens.axboe@oracle.com> [PATCH] Add 'bs_unaligned' option

If this is specified with 'bsrange', fio will use any byte size value
in the bs range for an io unit buffer length. Normally fio defaults to
using a multiple of the minimum bs size, as that is required for any
type of raw io.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
bb8895e07c6d6417410545f45d34b1b7916cd90a 30-Oct-2006 Jens Axboe <jens.axboe@oracle.com> [PATCH] Add 'norandommap' option

With this option given, fio will not keep track of what parts of a file
has been read/written or not. So for random io, we may read/write a block
a block more than once (or not at all). Thus this option conflicts with
doing write verification.

This is a first step for doing truly randomly sized blocks of io.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
076efc7c60c351df783960a646e7fe8fba29dc19 27-Oct-2006 Jens Axboe <jens.axboe@oracle.com> [PATCH] Improve io logging

write_iolog was broken. Change iolog= to read_iolog= to keep things
nicely seperated.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
6040dabcaaf29ecea9c68735a4d3a6ad6411f573 24-Oct-2006 Jens Axboe <jens.axboe@oracle.com> [PATCH] Make ->buflen == 0 on SYNC io_u's

It eases the error handling in the splice and sync io engine.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
87dc1ab1b4df7b977f60e3d43533a896e2ee665b 24-Oct-2006 Jens Axboe <jens.axboe@oracle.com> [PATCH] Implement file syncing as data direction

Instead of defining a seperate ->sync() operation for the io engine,
reuse the io_u infrastructure for committing and reaping sync
events as well. It's a nice cleanup as well.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
df415585cd9c54472b7aa77b9eca6206ab0cbb4f 20-Oct-2006 Jens Axboe <jens.axboe@oracle.com> [PATCH] Move related code next to each other

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c
10ba535a5cbb95b5576e33a6f8af093a6ca3bfd7 20-Oct-2006 Jens Axboe <jens.axboe@oracle.com> [PATCH] Split the io_u io handling out of fio.c

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
/external/fio/io_u.c