Re: [PATCH 1/4] io_uring: Always REQ_F_FREE_SQE for allocated sqe

Jens Axboe
2019-11-19T22:10:16Z

On 11/19/19 1:32 PM, Pavel Begunkov wrote:
> Always mark requests with allocated sqe and deallocate it in
> __io_free_req(). It's easier to follow and doesn't add edge cases.

I did consider doing this, and it is tempting as a cleanup, but it
also moves it into the fastpath instead of keeping it in the slow
link fail path. Any allocated sqe is normally freed when the work
is processed, which is generally also a better path to do it in as
we know we're not under locks/irq disabled.

--
Jens Axboe