X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=io_u.c;h=d80ef983c15972e4dbafc00fb68319826f16b3f2;hp=63a176f5eb02b315f3646bfca3fd299279e4f5e4;hb=75dc383e9d05369c830559496afa382178905e39;hpb=d86ae56c2995f90b5ac38de981d6f46114dabdf3 diff --git a/io_u.c b/io_u.c index 63a176f5..d80ef983 100644 --- a/io_u.c +++ b/io_u.c @@ -1604,6 +1604,9 @@ static void account_io_completion(struct thread_data *td, struct io_u *io_u, const int no_reduce = !gtod_reduce(td); unsigned long lusec = 0; + if (td->parent) + td = td->parent; + if (no_reduce) lusec = utime_since(&io_u->issue_time, &icd->time); @@ -1633,9 +1636,6 @@ static void account_io_completion(struct thread_data *td, struct io_u *io_u, io_u_mark_latency(td, lusec); } - if (td->parent) - td = td->parent; - if (!td->o.disable_bw) add_bw_sample(td, idx, bytes, &icd->time); @@ -1891,6 +1891,10 @@ void io_u_queued(struct thread_data *td, struct io_u *io_u) unsigned long slat_time; slat_time = utime_since(&io_u->start_time, &io_u->issue_time); + + if (td->parent) + td = td->parent; + add_slat_sample(td, io_u->ddir, slat_time, io_u->xfer_buflen, io_u->offset); }