Temporary iodepth_low work-around for syslets
authorJens Axboe <jens.axboe@oracle.com>
Tue, 27 Feb 2007 18:56:43 +0000 (19:56 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 27 Feb 2007 18:56:43 +0000 (19:56 +0100)
syslet really wants iodepth_low=1 for sequential workloads,
otherwise when fio starts issuing a new sequence of io, we'll
have pending-and-unsubmitted requests from the previous process.
The results is seeky instead of sequential requests.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
init.c

diff --git a/init.c b/init.c
index 636e957..33a1c28 100644 (file)
--- a/init.c
+++ b/init.c
@@ -708,8 +708,17 @@ static void fixup_options(struct thread_data *td)
        /*
         * The low water mark cannot be bigger than the iodepth
         */
-       if (td->iodepth_low > td->iodepth || !td->iodepth_low)
-               td->iodepth_low = td->iodepth;
+       if (td->iodepth_low > td->iodepth || !td->iodepth_low) {
+               /*
+                * syslet work around - if the workload is sequential,
+                * we want to let the queue drain all the way down to
+                * avoid seeking between async threads
+                */
+               if (!strcmp(td->io_ops->name, "syslet-rw") && !td_random(td))
+                       td->iodepth_low = 1;
+               else
+                       td->iodepth_low = td->iodepth;
+       }
 
        /*
         * If batch number isn't set, default to the same as iodepth