• Jens Axboe's avatar
    io_uring/msg_ring: add an alloc cache for io_kiocb entries · 50cf5f38
    Jens Axboe authored
    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: default avatarJens Axboe <axboe@kernel.dk>
    50cf5f38
io_uring.c 99.9 KB