t/io_uring: wait if we're at queue limit
authorJens Axboe <axboe@kernel.dk>
Tue, 15 Jan 2019 17:58:17 +0000 (10:58 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 15 Jan 2019 17:58:17 +0000 (10:58 -0700)
There was an off-by-one there, it's perfectly fine not to specify
events to wait for if the submission will take us to the queue
depth limit.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/io_uring.c

index 205769c..78b9268 100644 (file)
@@ -311,7 +311,7 @@ static void *submitter_fn(void *data)
 submit_more:
                to_submit = prepped;
 submit:
-               if (to_submit && (s->inflight + to_submit < DEPTH))
+               if (to_submit && (s->inflight + to_submit <= DEPTH))
                        to_wait = 0;
                else
                        to_wait = min(s->inflight + to_submit, BATCH_COMPLETE);