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)
commit919e789d0999bf13ef1ae670c536d2aef3709894
tree4800ce95f2682015af54903c359f0e0136f6f2c1
parentbc4f5ef67d26ef98f4822d5f798cb8c4e2d2fce5
fio: fix s390 time accounting

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>
arch/arch-s390.h
gettime.c