X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=backend.c;h=23734d595d0d60325e0d2df7aa12fa13750fcc54;hb=ae2fafc8525e980b8271e3230a0fd4da660fddda;hp=7343286d53219b0c8d4e8a44ec586f1cd66ac6b8;hpb=82af2a7ca1a543b41c003de69d5e3c36860f47d5;p=fio.git diff --git a/backend.c b/backend.c index 7343286d..23734d59 100644 --- a/backend.c +++ b/backend.c @@ -494,7 +494,10 @@ sync_done: if (full || !td->o.iodepth_batch_complete) { min_events = min(td->o.iodepth_batch_complete, td->cur_depth); - if (full && !min_events && td->o.iodepth_batch_complete != 0) + /* + * if the queue is full, we MUST reap at least 1 event + */ + if (full && !min_events) min_events = 1; do { @@ -555,7 +558,8 @@ static void do_io(struct thread_data *td) td_set_runstate(td, TD_RUNNING); while ((td->o.read_iolog_file && !flist_empty(&td->io_log_list)) || - (!flist_empty(&td->trim_list)) || !io_bytes_exceeded(td)) { + (!flist_empty(&td->trim_list)) || !io_bytes_exceeded(td) || + td->o.time_based) { struct timeval comp_time; unsigned long bytes_done[2] = { 0, 0 }; int min_evts = 0; @@ -676,7 +680,10 @@ sync_done: if (full || !td->o.iodepth_batch_complete) { min_evts = min(td->o.iodepth_batch_complete, td->cur_depth); - if (full && !min_evts && td->o.iodepth_batch_complete != 0) + /* + * if the queue is full, we MUST reap at least 1 event + */ + if (full && !min_evts) min_evts = 1; if (__should_check_rate(td, 0) ||