summaryrefslogtreecommitdiff
path: root/io_uring/rsrc.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2023-04-04 13:39:52 +0100
committerJens Axboe <axboe@kernel.dk>2023-04-04 09:30:39 -0600
commitff7c75ecaa9e6b251f76c24e289d4bfe413ffe31 (patch)
tree75168dbbfd5462d9189ec0ccf032e83bf539f57e /io_uring/rsrc.h
parentc824986c113f15e2ef2c00da9a226c09ecaac74c (diff)
io_uring/rsrc: optimise io_rsrc_put allocation
Every io_rsrc_node keeps a list of items to put, and all entries are kmalloc()'ed. However, it's quite often to queue up only one entry per node, so let's add an inline entry there to avoid extra allocations. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/c482c1c652c45c85ac52e67c974bc758a50fed5f.1680576071.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rsrc.h')
-rw-r--r--io_uring/rsrc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/rsrc.h b/io_uring/rsrc.h
index 509a5ea7eabf..11703082d125 100644
--- a/io_uring/rsrc.h
+++ b/io_uring/rsrc.h
@@ -49,6 +49,8 @@ struct io_rsrc_node {
* came from the same table and so are of the same type.
*/
struct list_head item_list;
+ struct io_rsrc_put item;
+ int inline_items;
};
struct io_mapped_ubuf {