X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Flibaio.c;h=7ac36b236cdf91a33f31ff738176d0fadd8c4235;hb=aeb7ff8f54e68fa7a8c35ca8b4c0061de1063cf1;hp=e0d7cbbafb780551f35c62c83bb9dd3b26b4b164;hpb=e6fe02651641fc64d2fa4fcfe9b1013b2947d11b;p=fio.git diff --git a/engines/libaio.c b/engines/libaio.c index e0d7cbba..7ac36b23 100644 --- a/engines/libaio.c +++ b/engines/libaio.c @@ -4,11 +4,9 @@ * IO engine using the Linux native aio interface. * */ -#include #include #include #include -#include #include #include "../fio.h" @@ -171,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); @@ -179,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; @@ -207,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; }