From: Jens Axboe Date: Thu, 16 Oct 2008 18:33:51 +0000 (+0200) Subject: Only memcpy last issue time when using iolog replay X-Git-Tag: fio-1.23~8 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=d0c153284c1e6505e711c71e6412e6fef02853b8;p=fio.git Only memcpy last issue time when using iolog replay Part of a series that'll allow switching off various time measurements to avoid impacting system performance too much. Signed-off-by: Jens Axboe --- diff --git a/ioengines.c b/ioengines.c index e447539c..1688c633 100644 --- a/ioengines.c +++ b/ioengines.c @@ -227,7 +227,12 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) if (td->io_ops->flags & FIO_SYNCIO) { fio_gettime(&io_u->issue_time, NULL); - memcpy(&td->last_issue, &io_u->issue_time, + + /* + * only used for iolog + */ + if (td->o.read_iolog_file) + memcpy(&td->last_issue, &io_u->issue_time, sizeof(struct timeval)); /* @@ -272,8 +277,13 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) if ((td->io_ops->flags & FIO_SYNCIO) == 0) { fio_gettime(&io_u->issue_time, NULL); - memcpy(&td->last_issue, &io_u->issue_time, - sizeof(struct timeval)); + + /* + * only used for iolog + */ + if (td->o.read_iolog_file) + memcpy(&td->last_issue, &io_u->issue_time, + sizeof(struct timeval)); /* * async engine, set the timeout here