I've been testing AIO on 2.5.72-mm1. While running tests using the
io_submit(), io_queue_run() and io_queue_wait() interfaces, I
noticed that io_queue_wait() was never waiting. It was always
returning immediately. The library implements
io_queue_wait(ctx, timeout) as io_getevents(ctx, 0, 0, NULL, timeout);
io_getevents() was always returning immediately since this is asking
for zero events. Here's a patch that allows io_getevents() to wait
for the timeout in this case. I changed aio_read_evt() to return
if there are any events, but not the events themselves and changed
read_events() to wait when there are no events.
I've tested this on my 2-proc.
Thoughts?
Daniel McNeil <[email protected]>