]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: add netmsg cache
authorJens Axboe <axboe@kernel.dk>
Thu, 7 Jul 2022 20:30:09 +0000 (14:30 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Jul 2022 00:39:17 +0000 (18:39 -0600)
commit89d68fca00741ce6bc8fc6d4a72693d25f8edb5c
tree36990dc646e88f2bc176bb4873fa783b09ac9c69
parent71a054619197ae08c029b036c6774c01feaaa232
io_uring: add netmsg cache

For recvmsg/sendmsg, if they don't complete inline, we currently need
to allocate a struct io_async_msghdr for each request. This is a
somewhat large struct.

Hook up sendmsg/recvmsg to use the io_alloc_cache. This reduces the
alloc + free overhead considerably, yielding 4-5% of extra performance
running netbench.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
io_uring/io_uring.c
io_uring/net.c
io_uring/net.h