mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
50cf5f3842
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>
7 lines
269 B
C
7 lines
269 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
int io_msg_ring_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
|
int io_msg_ring(struct io_kiocb *req, unsigned int issue_flags);
|
|
void io_msg_ring_cleanup(struct io_kiocb *req);
|
|
void io_msg_cache_free(const void *entry);
|