summaryrefslogtreecommitdiffstats
path: root/io_uring/opdef.h
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2022-08-24 13:07:42 +0100
committerJens Axboe <axboe@kernel.dk>2022-08-24 08:57:28 -0600
commit5916943943d19a854238d50d1fe2047467cbeb3c (patch)
tree491f1491a8b26101b43bc7c4941fc109975cc8f7 /io_uring/opdef.h
parent53bdc88aac9a21aae937452724fa4738cd843795 (diff)
downloadlinux-stable-5916943943d19a854238d50d1fe2047467cbeb3c.tar.gz
linux-stable-5916943943d19a854238d50d1fe2047467cbeb3c.tar.bz2
linux-stable-5916943943d19a854238d50d1fe2047467cbeb3c.zip
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>
Diffstat (limited to 'io_uring/opdef.h')
-rw-r--r--io_uring/opdef.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/opdef.h b/io_uring/opdef.h
index ece8ed4f96c4..763c6e54e2ee 100644
--- a/io_uring/opdef.h
+++ b/io_uring/opdef.h
@@ -25,6 +25,8 @@ struct io_op_def {
unsigned ioprio : 1;
/* supports iopoll */
unsigned iopoll : 1;
+ /* opcode specific path will handle ->async_data allocation if needed */
+ unsigned manual_alloc : 1;
/* size of async data needed, if any */
unsigned short async_size;