On 6/9/22 1:53 AM, Hao Xu wrote: > Hi all, > I haven't done tests to demonstrate it. It is for partial io case, we > don't consume/release the buffer before arm_poll in ring-mapped mode. > But seems we should? Otherwise ring head isn't moved and other requests > may take that buffer. What do I miss? On vacation this week, so can't take a look at the code. But the principle is precisely not to consume the buffer if we arm poll, because then the next one can grab it instead. We don't want to consume a buffer over poll, as that defeats the purpose of a provided buffer. It should be grabbed and consumed only if we can use it right now. Hence the way it should work is that we DON'T consume the buffer in this case, and that someone else can just use it. At the same time, we should ensure that we grab a NEW buffer for this case, whenever the poll triggers and we can retry the IO. As mentioned I can't check the code right now, but perhaps you can take a look. -- Jens Axboe