fix early termination of runs caused by ramp_time > runtime

If ramp_time was longer than the runtime, then the run terminated immediately
after the ramp_time was exceeded. In order to avoid this, teach
runtime_exceeded about ramp_time.

Signed-off-by: Steven Noonan <snoonan@amazon.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
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>
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>
Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio
Grow file num_maps to unsigned long

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Fix bad types for mac blockdev_size()

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Keep reducing jobs on ENOMEM for shmget()

Some platforms return ENOMEM, not just EINVAL, for too large
a size.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
windowsaio: fix file offset bug

I was monitoring file IO while running fio today and noticed that the file
offset when using windowsaio was always 0.
Because the OVERLAPPED structure contains a union, by initializing Pointer
to NULL the code was also overwriting the Offset field.
I've attached a patch that fixes it.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
windowsaio: style fixes

Some weird 4-space tabs in there, clean it up.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Make random map allocation more resilient

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Reenable io_u->buf_filled_len optimization

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Fio 2.0.2

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Optimize pattern filling by limiting small calls to memcpy

In looking at profiling the speed of fill_pattern(), it calls memcpy()
for the fill pattern repeatedly for multibyte patterns.  So for a 4
byte pattern with 8k IO, it calls memcpy() 2048 times.

Since there is already 512 bytes reserved for the pattern, I figured a
simple solution was to use it.  This patch replicates short patterns
so they can be more efficiently copied.  (Single byte patterns are
left alone since they can make use of the much more efficient memset()
call.)

The result is a 10x performance improvement on pattern filling. (With
this patch, it's still 3x slower than when it re-uses the already
filled pattern.)

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Avoid divide-by-zero for disk util on 0 msec runtime

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Use CLOCK_MONOTONIC if we can

Signed-off-by: Jens Axboe <axboe@kernel.dk>
mac: remove unused timer_create()

Signed-off-by: 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>
Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio
Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio
Add regression test job file for commit 52c58027

Signed-off-by: Jens Axboe <axboe@kernel.dk>