[PATCH] fio: async thinktime should be at the end
authorJens Axboe <axboe@suse.de>
Fri, 28 Oct 2005 14:34:37 +0000 (16:34 +0200)
committerJens Axboe <axboe@suse.de>
Fri, 28 Oct 2005 14:34:37 +0000 (16:34 +0200)
fio.c

diff --git a/fio.c b/fio.c
index 0364ffa35caf033cb798415bd37c08074dc9bb06..0819b42991ae3dec84b9f3b23e5f97cdbd747396 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -770,9 +770,6 @@ static void do_async_io(struct thread_data *td)
 
                gettimeofday(&io_u->issue_time, NULL);
                add_slat_sample(td, mtime_since(&io_u->start_time, &io_u->issue_time));
-               if (td->thinktime)
-                       usec_sleep(td->thinktime);
-
                if (td->cur_depth < td->aio_depth) {
                        timeout = &ts;
                        min_evts = 0;
@@ -811,6 +808,9 @@ static void do_async_io(struct thread_data *td)
 
                if (runtime_exceeded(td, &e))
                        break;
+
+               if (td->thinktime)
+                       usec_sleep(td->thinktime);
        }
 
        if (td->cur_depth)