On 13 Aug 2013, at 14:45, Jan Kiszka wrote: > Yeah: > > - /* No AIO operations? Get us out of here */ > - if (!busy) { > + /* early return if we only have the aio_notify() fd */ > + if (ctx->pollfds->len == 1) { > return progress; > } > > So this is even worse for my use case.
Oh yes :-) OK, well Stefan's patch series is thus more predictable, but I think still wrong (to be fair to Stefan, his patch was made before it made sense for aio_poll to be called with no FDs bar the eventfd and blocking=1) I think it should be: - /* No AIO operations? Get us out of here */ - if (!busy) { + /* early return if we only have the aio_notify() fd */ + if (!blocking && (ctx->pollfds->len == 1)) { return progress; } And perhaps <=1 for safety. -- Alex Bligh