summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
5f739e0)
If we are going to sleep to satisfy a given rate limit, then
ensure that we flush pending IO first. Otherwise they end up
including the sleep time in the calculated completion latencies.
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
} else
usec = td->rate_pending_usleep[ddir];
} else
usec = td->rate_pending_usleep[ddir];
+ /*
+ * We are going to sleep, ensure that we flush anything pending as
+ * not to skew our latency numbers
+ */
+ if (td->cur_depth) {
+ int fio_unused ret;
+
+ ret = io_u_queued_complete(td, td->cur_depth, NULL);
+ }
+
fio_gettime(&t, NULL);
usec_sleep(td, usec);
usec = utime_since_now(&t);
fio_gettime(&t, NULL);
usec_sleep(td, usec);
usec = utime_since_now(&t);