[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>
diff --git a/ioengines.c b/ioengines.c
index 56a718c..1666612 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -176,7 +176,7 @@
int td_io_queue(struct thread_data *td, struct io_u *io_u)
{
- gettimeofday(&io_u->issue_time, NULL);
+ fio_gettime(&io_u->issue_time, NULL);
return td->io_ops->queue(td, io_u);
}