io_uring/rsrc: optimise io_rsrc_put allocation
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 4 Apr 2023 12:39:52 +0000 (13:39 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Apr 2023 15:30:39 +0000 (09:30 -0600)
commitff7c75ecaa9e6b251f76c24e289d4bfe413ffe31
tree75168dbbfd5462d9189ec0ccf032e83bf539f57e
parentc824986c113f15e2ef2c00da9a226c09ecaac74c
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>
io_uring/rsrc.c
io_uring/rsrc.h