io_uring/msg_ring: add an alloc cache for io_kiocb entries io_uring-msg-ring.1
authorJens Axboe <axboe@kernel.dk>
Thu, 6 Jun 2024 18:25:01 +0000 (12:25 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 18 Jun 2024 18:42:28 +0000 (12:42 -0600)
commita0c97eda9518d08339d4008980357b98d7fcea54
treea630cf07fe87df4c435887146b4e96e20ebbe947
parentaa72733ed0b42b7d25e251528702907ffe785e24
io_uring/msg_ring: add an alloc cache for io_kiocb entries

With slab accounting, allocating and freeing memory has considerable
overhead. Add a basic alloc cache for the io_kiocb allocations that
msg_ring needs to do. Unlike other caches, this one is used by the
sender, grabbing it from the remote ring. When the remote ring gets
the posted completion, it'll free it locally. Hence it is separately
locked, using ctx->msg_lock.

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