On 11/24/22 19:17, Pavel Begunkov wrote:
On 11/24/22 18:46, Jens Axboe wrote:
On 11/24/22 9:16?AM, Pavel Begunkov wrote:
On 11/21/22 14:52, Jens Axboe wrote:
__io_cq_unlock_post() is identical to io_cq_unlock_post(), and
io_cqring_ev_posted() has a single caller so migth as well just inline
it there.
It was there for one purpose, to inline it in the hottest path,
i.e. __io_submit_flush_completions(). I'll be reverting it back
The compiler is most certainly already doing that, in fact even
.L1493:
# io_uring/io_uring.c:631: io_cq_unlock_post(ctx);
movq %r15, %rdi # ctx,
call io_cq_unlock_post #
wrong one,
__io_submit_flush_completions:
pushq %rbp #
...
.L1793:
# io_uring/io_uring.c:1394: io_cq_unlock_post(ctx);
movq %r12, %rdi # ctx,
call io_cq_unlock_post #
Even more, after IORING_SETUP_CQE32 was added I didn't see
once __io_fill_cqe_req actually inlined even though it's marked
so.
__io_submit_flush_completions() is inlined in
io_submit_flush_completions() for me here.
And io_submit_flush_completions is inlined as well, right?
That would be quite odd, __io_submit_flush_completions() is not
small by any means and there are 3 call sites.
--
Pavel Begunkov