Pavel Begunkov
75d7b3aec1
io_uring: kill REQ_F_COMPLETE_INLINE
...
REQ_F_COMPLETE_INLINE is only needed to delay queueing into the
completion list to io_queue_sqe() as __io_req_complete() is inlined and
we don't want to bloat the kernel.
As now we complete in a more centralised fashion in io_issue_sqe() we
can get rid of the flag and queue to the list directly.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com >
Link: https://lore.kernel.org/r/600ba20a9338b8a39b249b23d3d177803613dde4.1655371007.git.asml.silence@gmail.com
Reviewed-by: Hao Xu <howeyxu@tencent.com >
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:13 -06:00
Pavel Begunkov
aa1e90f64e
io_uring: move small helpers to headers
...
There is a bunch of inline helpers that will be useful not only to the
core of io_uring, move them to headers.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com >
Link: https://lore.kernel.org/r/22df99c83723e44cba7e945e8519e64e3642c064.1655310733.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:13 -06:00
Jens Axboe
f3b44f92e5
io_uring: move read/write related opcodes to its own file
...
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:12 -06:00
Jens Axboe
c98817e6cd
io_uring: move remaining file table manipulation to filetable.c
...
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:12 -06:00
Jens Axboe
7357298448
io_uring: move rsrc related data, core, and commands
...
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:12 -06:00
Jens Axboe
3b77495a97
io_uring: split provided buffers handling into its own file
...
Move both the opcodes related to it, and the internals code dealing with
it.
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:12 -06:00
Jens Axboe
7aaff708a7
io_uring: move cancelation into its own file
...
This also helps cleanup the io_uring.h cancel parts, as we can make
things static in the cancel.c file, mostly.
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:12 -06:00
Jens Axboe
329061d3e2
io_uring: move poll handling into its own file
...
Add a io_poll_issue() rather than export the general task_work locking
and io_issue_sqe(), and put the io_op_defs definition and structure into
a separate header file so that poll can use it.
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:12 -06:00
Jens Axboe
c9f06aa7de
io_uring: move io_uring_task (tctx) helpers into its own file
...
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:12 -06:00
Jens Axboe
17437f3114
io_uring: move SQPOLL related handling into its own file
...
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:12 -06:00
Jens Axboe
59915143e8
io_uring: move timeout opcodes and handling into its own file
...
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:12 -06:00
Jens Axboe
f9ead18c10
io_uring: split network related opcodes into its own file
...
While at it, convert the handlers to just use io_eopnotsupp_prep()
if CONFIG_NET isn't set.
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:11 -06:00
Jens Axboe
99f15d8d61
io_uring: move uring_cmd handling to its own file
...
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:11 -06:00
Jens Axboe
cd40cae29e
io_uring: split out open/close operations
...
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:11 -06:00
Jens Axboe
531113bbd5
io_uring: split out splice related operations
...
This splits out splice and tee support.
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:11 -06:00
Jens Axboe
97b388d70b
io_uring: handle completions in the core
...
Normally request handlers complete requests themselves, if they don't
return an error. For the latter case, the core will complete it for
them.
This is unhandy for pushing opcode handlers further out, as we don't
want a bunch of inline completion code and we don't want to make the
completion path slower than it is now.
Let the core handle any completion, unless the handler explicitly
asks us not to.
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:11 -06:00
Jens Axboe
de23077eda
io_uring: set completion results upfront
...
Signed-off-by: Jens Axboe <axboe@kernel.dk >
2022-07-24 18:39:11 -06:00