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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/20/2019 1:10 AM, Jens Axboe wrote:
> 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.

Good point with locks/irq, but io_put_req() is usually called out of
locking. Isn't it? E.g. @completion_lock is taken mainly by *add_cq_event().

SQE needs to be freed in any case, and there is only one extra "if",
what we really should not worry about. There are much heavier parts.
e.g. excessive atomics/locking, I'll send an RFC for that, if needed.

I find the complexity of much more concern here.

-- 
Pavel Begunkov



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux