Skip to content

Rewrite rsrc node handling

Jens Axboe io-uring linux-m68k linux-mm lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 22 repliesIn review
  2. v2 RFC13 patches 0 repliesSuperseded
  3. v1 RFC7 patches 0 repliesSuperseded

Changes in v3 from the cover letter

- Don't pass in pointer to index to io_rsrc_node_lookup()
- Add io_reset_rsrc_node() helper, which cleans up some of the "lookup old node, if it exists, and put it" logic in various spots.
- Get rid of 'rsrc' member in buf/file union, clear the right pointer when the specific resource is put
- Drop unused IORING_RSRC_INVALID type
- Drop unused 'index' argument for io_rsrc_node_alloc()
- Use rsrc_empty_node consistently
- Rebase on current for-6.13 + 6.12 fixes

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14io_uring/nop: add support for testing registered files and buffersinclude/uapi/linux/io_uring.h io_uring/nop.c+47 -50 replies
2/14io_uring/rsrc: move struct io_fixed_file to rsrc.h headerinclude/linux/io_uring_types.h io_uring/filetable.h io_uring/rsrc.h+6 -50 replies
3/14io_uring: specify freeptr usage for SLAB_TYPESAFE_BY_RCU io_kiocb cacheio_uring/io_uring.c+2 -022 replies
4/14io_uring/splice: open code 2nd direct file assignmentio_uring/opdef.c io_uring/splice.c io_uring/splice.h+39 -80 replies
5/14io_uring/rsrc: kill io_charge_rsrc_node()io_uring/rsrc.h+1 -70 replies
6/14io_uring/rsrc: get rid of per-ring io_rsrc_node listinclude/linux/io_uring_types.h io_uring/fdinfo.c io_uring/filetable.c +10 more+272 -4650 replies
7/14io_uring/rsrc: get rid of io_rsrc_node allocation cacheinclude/linux/io_uring_types.h io_uring/io_uring.c io_uring/rsrc.c+7 -200 replies
8/14io_uring/rsrc: add an empty io_rsrc_node for sparse buffer entriesio_uring/io_uring.c io_uring/notif.c io_uring/rsrc.c +2 more+41 -290 replies
9/14io_uring: only initialize io_kiocb rsrc_nodes when neededio_uring/io_uring.c io_uring/rsrc.h+10 -40 replies
10/14io_uring/rsrc: unify file and buffer resource tablesinclude/linux/io_uring_types.h io_uring/cancel.c io_uring/fdinfo.c +12 more+127 -2160 replies
11/14io_uring/rsrc: add io_rsrc_node_lookup() helperio_uring/cancel.c io_uring/filetable.c io_uring/filetable.h +9 more+57 -590 replies
12/14io_uring/filetable: remove io_file_from_index() helperio_uring/fdinfo.c io_uring/filetable.h+3 -110 replies
13/14io_uring/filetable: kill io_reset_alloc_hint() helperio_uring/filetable.h+1 -60 replies
14/14io_uring/rsrc: add io_reset_rsrc_node() helperio_uring/filetable.c io_uring/rsrc.c io_uring/rsrc.h+17 -160 replies

Reviews trailers per patch

None of the 14 patches has a Reviewed-by or Acked-by.

PatchGuenter Roeck
1/14
2/14
3/14T-b
4/14
5/14
6/14
7/14
8/14
9/14
10/14
11/14
12/14
13/14
14/14

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCHSET v3 0/14] Rewrite rsrc node handling

Hi,

Here's v3 of this patchset, it's looking pretty clean by now. For the v2 posting, please look here:

https://lore.kernel.org/io-uring/[email protected]/T/#ma92ca3d24796b56414c68e49213bf6455002eb06

This series can also be found here:

https://git.kernel.dk/cgit/linux/log/?h=io_uring-rsrc

with previous versions in .1, and .2 postfixes of that branch.

Changes since v2:
- Don't pass in pointer to index to io_rsrc_node_lookup()
- Add io_reset_rsrc_node() helper, which cleans up some of the "lookup old node, if it exists, and put it" logic in various spots.
- Get rid of 'rsrc' member in buf/file union, clear the right pointer when the specific resource is put
- Drop unused IORING_RSRC_INVALID type
- Drop unused 'index' argument for io_rsrc_node_alloc()
- Use rsrc_empty_node consistently
- Rebase on current for-6.13 + 6.12 fixes

 include/linux/io_uring_types.h |  25 +-
 include/uapi/linux/io_uring.h  |   3 +
 io_uring/cancel.c              |   8 +-
 io_uring/fdinfo.c              |  14 +-
 io_uring/filetable.c           |  66 ++--
 io_uring/filetable.h           |  31 +-
 io_uring/io_uring.c            |  51 +--
 io_uring/msg_ring.c            |  31 +-
 io_uring/net.c                 |  15 +-
 io_uring/nop.c                 |  47 ++-
 io_uring/notif.c               |   3 +-
 io_uring/opdef.c               |   2 +
 io_uring/register.c            |   3 +-
 io_uring/rsrc.c                | 578 +++++++++++----------------------
 io_uring/rsrc.h                |  98 +++---
 io_uring/rw.c                  |  12 +-
 io_uring/splice.c              |  42 ++-
 io_uring/splice.h              |   1 +
 io_uring/uring_cmd.c           |  19 +-
 19 files changed, 414 insertions(+), 635 deletions(-)
Signature · 1 line
Jens Axboe