Skip to content

Cleanup alloc cache init_once handling

Jens Axboe io-uring 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 1 replyIn review
  2. v12 patches 10 repliesSuperseded

Changes in v2 from the cover letter

- Make the iovec caching play nice with KASAN. We just free it now, as even basic KASAN will stomp on this memory. This should also fix the reported issue with KASAN_EXTRA_INFO and msghdr on the net side without needing KASAN changes.
- Cleanup the uring_cmd bits, we don't need to retain anything there.
- Use struct_group() for the rw and net bits.
- Add patch killing the _nocache() helper, just allow passing in a NULL cache for those two cases.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3io_uring/uring_cmd: cleanup struct io_uring_cmd_data layoutio_uring/uring_cmd.c+3 -30 replies
2/3io_uring: get rid of alloc cache init_once handlinginclude/linux/io_uring/cmd.h include/linux/io_uring_types.h io_uring/alloc_cache.h +9 more+91 -931 reply
3/3io_uring/alloc_cache: get rid of _nocache() helperio_uring/io_uring.h io_uring/timeout.c io_uring/waitid.c+9 -130 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchGabriel Krisman Bertazi
1/3
2/3R-b
3/3

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

Read the v2 thread

Cover letter [PATCHSET v2 0/3] Cleanup alloc cache init_once handling

Hi,

A minor prep patch cleaning up some confusion on types for uring_cmd, which don't matter now, but will after patch 2. Patch 2 gets rid of the init_once, and has the cache init functions pass in the number of bytes to clear for a fresh allocation.

Since v1:
- Make the iovec caching play nice with KASAN. We just free it now, as even basic KASAN will stomp on this memory. This should also fix the reported issue with KASAN_EXTRA_INFO and msghdr on the net side without needing KASAN changes.
- Cleanup the uring_cmd bits, we don't need to retain anything there.
- Use struct_group() for the rw and net bits.
- Add patch killing the _nocache() helper, just allow passing in a NULL cache for those two cases.

 include/linux/io_uring/cmd.h   |  2 +-
 include/linux/io_uring_types.h |  3 ++-
 io_uring/alloc_cache.h         | 43 +++++++++++++++++++++++++++-------
 io_uring/futex.c               |  4 ++--
 io_uring/io_uring.c            | 12 ++++++----
 io_uring/io_uring.h            | 21 +++++++----------
 io_uring/net.c                 | 28 +++++-----------------
 io_uring/net.h                 | 20 +++++++++-------
 io_uring/poll.c                |  2 +-
 io_uring/rw.c                  | 27 +++++----------------
 io_uring/rw.h                  | 27 ++++++++++++---------
 io_uring/timeout.c             |  2 +-
 io_uring/uring_cmd.c           | 17 ++++----------
 io_uring/waitid.c              |  2 +-
 14 files changed, 102 insertions(+), 108 deletions(-)