Move io_buffer_list out of struct io_kiocb
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest12 patches 0 repliesNew
- v19 patches 0 repliesSuperseded
Changes in v2 from the cover letter
- Drop 'issue_flags' from both io_put_kbuf() and io_put_kbufs(), unused in both.
- Add patch folding 'ret' in io_send_finish() with io_br_sel, just like was previously done on the receive side.
- Add patch checking for REQ_F_BUFFER_RING first in recycling.
- Rebase on current for-6.18/io_uring branch.
Patches in v2 No applies recorded yet
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCHSET v2 0/12] Move io_buffer_list out of struct io_kiocb
Hi,
One thing that has annoyed me is that struct io_buffer_list is inside struct io_kiocb, as they have potentially drastically different lifetimes. This makes it easy to screw up, even if you think you know what you are doing, as you need to understand the intricacies of provided buffer ring lifetimes.
This patchset adds a struct io_br_sel, which is used for buffer selection, and which also then stores the io_buffer_list whenever it is safe to do so. io_br_sel resides on the stack of the user, and hence cannot leak outside of that scope.
With this, we can also cleanup some of the random recycle points we have in the code base in general.
Should not have any functional changes, unless I screwed up of course. Passes full liburing tests as well.
Can also be found here:
https://git.kernel.dk/cgit/linux/log/?h=io_uring-buf-list
include/linux/io_uring_types.h | 6 -- io_uring/io_uring.c | 4 +- io_uring/kbuf.c | 67 ++++++++------- io_uring/kbuf.h | 57 +++++++----- io_uring/net.c | 153 ++++++++++++++++----------------- io_uring/poll.c | 4 - io_uring/rw.c | 56 ++++++------ 7 files changed, 177 insertions(+), 170 deletions(-)
Since v1:
- Drop 'issue_flags' from both io_put_kbuf() and io_put_kbufs(), unused in both.
- Add patch folding 'ret' in io_send_finish() with io_br_sel, just like was previously done on the receive side.
- Add patch checking for REQ_F_BUFFER_RING first in recycling.
- Rebase on current for-6.18/io_uring branch.
Signature · 1 line
Jens Axboe