Respect iodepth_batch_complete=0 in main loop
authorDan Ehrenberg <dehrenberg@google.com>
Sat, 23 Jul 2011 11:36:44 +0000 (13:36 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Sat, 23 Jul 2011 11:36:44 +0000 (13:36 +0200)
If the iodepth_batch_complete is 0, then even if the queue is full,
we still don't make min_events be 1 in the main loop. Instead, poll
in a non-blocking way until a result is found.

Signed-off-by: Dan Ehrenberg <dehrenberg@google.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
fio.c

diff --git a/fio.c b/fio.c
index 120431e90cb2c1ec1693aac1f56ad2a4aa150e59..73964214d3468d93a4f0ed72f4ecbd330f57b9c6 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -557,7 +557,7 @@ sync_done:
                if (full || !td->o.iodepth_batch_complete) {
                        min_events = min(td->o.iodepth_batch_complete,
                                         td->cur_depth);
-                       if (full && !min_events)
+                       if (full && !min_events && td->o.iodepth_batch_complete != 0)
                                min_events = 1;
 
                        do {
@@ -719,7 +719,7 @@ sync_done:
                if (full || !td->o.iodepth_batch_complete) {
                        min_evts = min(td->o.iodepth_batch_complete,
                                        td->cur_depth);
-                       if (full && !min_evts)
+                       if (full && !min_evts && td->o.iodepth_batch_complete != 0)
                                min_evts = 1;
 
                        if (__should_check_rate(td, 0) ||