Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 790b68b3 authored by Jens Axboe's avatar Jens Axboe
Browse files

io_uring/net: always setup an io_async_msghdr


Rather than use an on-stack one and then need to allocate and copy if
async execution is required, always grab one upfront. This should be
very cheap, and potentially even have cache hotness benefits for
back-to-back send/recv requests.

For any recv type of request, this is probably a good choice in general,
as it's expected that no data is available initially. For send this is
not necessarily the case, as space in the socket buffer is expected to
be available. However, getting a cached io_async_msghdr is very cheap,
and as it should be cache hot, probably the difference here is neglible,
if any.

A nice side benefit is that io_setup_async_msg can get killed
completely, which has some nasty iovec manipulation code.

Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f5b00ab2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment