On Thu, Jun 28, 2018 at 3:49 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > > aio_poll() is not a problem. It's wakeup callback that is one. No, it's not a problem either. The only thing the wakup callback wants to do is to remove the wait queue entry. And *that* doesn't need to sleep, and it has absolutely nothing to do with whether "->poll()" itself sleeps or not. All that needs to do is "poll_freewait()". Done. In practice, it's probably only going to be a single free_poll_entry(), but who cares? The AIO code should handle the "maybe ->poll() added multiple wait-queues" just fine. > You are misreading that mess. What he's trying to do (other than surviving > the awful clusterfuck around cancels) is to handle the decision what to > report to userland right in the wakeup callback. *That* is what really > drives the "make the second-pass ->poll() or something similar to it > non-blocking" (in addition to the fact that it is such in considerable > majority of instances). That's just crazy BS. Just call poll() again when you copy the data to userland (which by definition can block, again). Stop the idiotic "let's break poll for stupid AIO reasons, because the AIO people are morons". Just make the AIO code do the sane thing. Linus