From: Jens Axboe Date: Tue, 20 Feb 2007 10:34:54 +0000 (+0100) Subject: Fix sync engine completion latency X-Git-Tag: fio-1.12~53 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=5aeb77df5d75d1065b339c47afbd882a3c04702e Fix sync engine completion latency td_io_queue() needs to differentiate between the sync and async engines wrt setting issue_time. Signed-off-by: Jens Axboe --- diff --git a/ioengines.c b/ioengines.c index 2a11ed32..db333796 100644 --- a/ioengines.c +++ b/ioengines.c @@ -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; }