fio: fix s390 time accounting
authorChristian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Tue, 8 Apr 2014 15:52:00 +0000 (17:52 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 8 Apr 2014 16:11:23 +0000 (10:11 -0600)
The current timer implementation could cause time warps on s390 which ends up
as time bound jobs that would never end, because they always reset themself to
the old time.

When touching this code anyway, we also change it to use the faster stckf
and avoid the calibration as we can control the result to be usecs.
This also eliminates a few calculations cycle->usec in the hot path for the
timer.

In case other architectures have similar improved timers that might not be
usec based, but nsec based or such a thing any architecture can set
ARCH_CPU_CLOCK_CYCLES_PER_USEC to an appropriate per-arch value.
This leaves the infrastructure open for others and the compiler will throw
our division by 1 away anyway.

Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Jens Axboe <axboe@fb.com>

No differences found