[PATCH 2.7.72-mm1] aio wait on io_queue_wait()

From: Daniel McNeil (daniel@osdl.org)
Date: Thu Jun 19 2003 - 18:09:49 EST


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 <daniel@osdl.org>



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jun 23 2003 - 22:00:31 EST