Fix sync engine completion latency
authorJens Axboe <jens.axboe@oracle.com>
Tue, 20 Feb 2007 10:34:54 +0000 (11:34 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 20 Feb 2007 10:34:54 +0000 (11:34 +0100)
td_io_queue() needs to differentiate between the sync and async
engines wrt setting issue_time.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
ioengines.c

index 2a11ed322ecd49fba5751cf958397da09097c4af..db333796f57c273250d60d40ed11b8a69c697412 100644 (file)
@@ -189,12 +189,17 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u)
 {
        int ret;
 
+       if (td->io_ops->flags & FIO_SYNCIO)
+               fio_gettime(&io_u->issue_time, NULL);
 
        if (io_u->ddir != DDIR_SYNC)
                td->io_issues[io_u->ddir]++;
 
        ret = td->io_ops->queue(td, io_u);
-       fio_gettime(&io_u->issue_time, NULL);
+
+       if ((td->io_ops->flags & FIO_SYNCIO) == 0)
+               fio_gettime(&io_u->issue_time, NULL);
+
        return ret;
 }