On 24/02/2020 18:27, Jens Axboe wrote: > 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 :-) Yeah, I saw it and understand the motive, and how it may happen, but can't find a line, which can actually return -EAGAIN. Could you please point to an example? E.g. I suppose for io_read() it may happen in call_read_iter(), but its result (i.e. res2) will be written to cqe, but not returned. > 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. -- Pavel Begunkov