X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Flibaio.c;h=7ac36b236cdf91a33f31ff738176d0fadd8c4235;hb=16500b5a0b03ee0142d592bb74a46943a223b06e;hp=7d59df3869f12238d3ebdefc6ae4f85145b9de85;hpb=3d2d14bcb844e72809192311369a642c5d415472;p=fio.git diff --git a/engines/libaio.c b/engines/libaio.c index 7d59df38..7ac36b23 100644 --- a/engines/libaio.c +++ b/engines/libaio.c @@ -169,7 +169,8 @@ static int fio_libaio_getevents(struct thread_data *td, unsigned int min, events += r; else if ((min && r == 0) || r == -EAGAIN) { fio_libaio_commit(td); - usleep(100); + if (actual_min) + usleep(10); } else if (r != -EINTR) break; } while (events < min); @@ -177,7 +178,8 @@ static int fio_libaio_getevents(struct thread_data *td, unsigned int min, return r < 0 ? r : events; } -static int fio_libaio_queue(struct thread_data *td, struct io_u *io_u) +static enum fio_q_status fio_libaio_queue(struct thread_data *td, + struct io_u *io_u) { struct libaio_data *ld = td->io_ops_data; @@ -205,6 +207,8 @@ static int fio_libaio_queue(struct thread_data *td, struct io_u *io_u) return FIO_Q_BUSY; do_io_u_trim(td, io_u); + io_u_mark_submit(td, 1); + io_u_mark_complete(td, 1); return FIO_Q_COMPLETED; }