RFC pre-mapped rw attributes
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest4 patches 4 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | io_uring: add structure for registered argumentsinclude/ io_uring/ io_uring/ +1 more | +28 | 0 replies | |
| 2/4 | io_uring: add registered request argumentsinclude/ io_uring/ | +5 | 2 replies | |
| 3/4 | io_uring/rw: use READ_ONCE with rw attributesio_uring/ | +14 | 0 replies | |
| 4/4 | io_uring/rw: pre-mapped rw attributesinclude/ io_uring/ | +17 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC 0/4] pre-mapped rw attributes
warning: not properly tested
Follow up on the discussion about optimising copy_from_user() for read/write attributes. The idea here is to use registered regions (see IORING_REGISTER_MEM_REGION) for that purpose pretty much in the same way registered wait arguments work.
Putting it simply, a region is a user provided chunk of memory that has been registered and pre-mapped into io_uring / kernel, but it has more modes like mmap'ing kernel memory. For attributes the user passes an offset into a region, and the kernel can read from it directly without copy_from_user().
The other alternative is to store attributes into the upper half of SQE128, but then we might run out of space in SQE for larger and/or compound attributes. It'd also require SQE128, which has a (perhaps minor) downside when other types of requests don't need it.
Pavel Begunkov (4):
io_uring: add structure for registered arguments
io_uring: add registered request arguments io_uring/rw: use READ_ONCE with rw attributes io_uring/rw: pre-mapped rw attributes
include/linux/io_uring_types.h | 11 ++++++++-- include/uapi/linux/io_uring.h | 4 +++- io_uring/io_uring.c | 23 +++------------------ io_uring/io_uring.h | 16 +++++++++++++++ io_uring/register.c | 7 +++++-- io_uring/rw.c | 37 ++++++++++++++++++++++++---------- 6 files changed, 62 insertions(+), 36 deletions(-)
Signature · 1 line
2.47.1