diff options
author | Keith Busch <kbusch@kernel.org> | 2025-02-27 14:39:16 -0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-02-28 07:05:46 -0700 |
commit | ed9f3112a8a8f6e6919d3b9da2651fa302df7be3 (patch) | |
tree | 4d6c3d569625be201e5fb33a44d2f0fb9a224e95 /io_uring/filetable.c | |
parent | 1f6540e2aabb7372e68223a3669019589c3e30ad (diff) |
io_uring: cache nodes and mapped buffers
Frequent alloc/free cycles on these is pretty costly. Use an io cache to
more efficiently reuse these buffers.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Link: https://lore.kernel.org/r/20250227223916.143006-7-kbusch@meta.com
[axboe: fix imu leak]
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/filetable.c')
-rw-r--r-- | io_uring/filetable.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/filetable.c b/io_uring/filetable.c index dd8eeec97acf..a21660e3145a 100644 --- a/io_uring/filetable.c +++ b/io_uring/filetable.c @@ -68,7 +68,7 @@ static int io_install_fixed_file(struct io_ring_ctx *ctx, struct file *file, if (slot_index >= ctx->file_table.data.nr) return -EINVAL; - node = io_rsrc_node_alloc(IORING_RSRC_FILE); + node = io_rsrc_node_alloc(ctx, IORING_RSRC_FILE); if (!node) return -ENOMEM; |