On 2/24/20 2:15 AM, Pavel Begunkov wrote: > It seems no opcode may return -EAGAIN for non-blocking case and expect > to be reissued. Remove retry code from io_wq_submit_work(). There's actually a comment right there on how that's possible :-) Normally, for block IO, we can wait for request slots if we run out. For polled IO, that isn't possible since the task itself is the one that will find completions and hence free request slots as well. If the submitting task is allowed to sleep waiting for requests that it itself are supposed to find and complete, then we'd hang. Hence we return -EAGAIN for that case, and have no other choice for polled IO than to retry. -- Jens Axboe