]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: conditional ->async_data allocation
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 24 Aug 2022 12:07:42 +0000 (13:07 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 24 Aug 2022 14:57:28 +0000 (08:57 -0600)
commit711586e29a20b85f2c1e63ae43f82051a564693c
tree491f1491a8b26101b43bc7c4941fc109975cc8f7
parentba41912e1efb0d5e8ac1a199147951c2d9444f4b
io_uring: conditional ->async_data allocation

There are opcodes that need ->async_data only in some cases and
allocation it unconditionally may hurt performance. Add an option to
opdef to make move the allocation part from the core io_uring to opcode
specific code.
Note, we can't just set opdef->async_size to zero because there are
other helpers that rely on it, e.g. io_alloc_async_data().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/9dc62be9e88dd0ed63c48365340e8922d2498293.1661342812.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/opdef.h