mbox series

[PATCHSET,v3,0/4] Add support for ring resizing

Message ID 20241024170829.1266002-1-axboe@kernel.dk (mailing list archive)
Headers show
Series Add support for ring resizing | expand

Message

Jens Axboe Oct. 24, 2024, 5:07 p.m. UTC
Hi,

Here's v3 of the ring resizing support. For the v1 posting and details,
look here:

https://lore.kernel.org/io-uring/20241022021159.820925-1-axboe@kernel.dk/T/#md3a2f049b0527592cc6d8ea25b46bde9fa8e5c68

 include/uapi/linux/io_uring.h |   3 +
 io_uring/io_uring.c           |  84 +++++++------
 io_uring/io_uring.h           |   6 +
 io_uring/memmap.c             |   4 +
 io_uring/register.c           | 214 ++++++++++++++++++++++++++++++++++
 5 files changed, 273 insertions(+), 38 deletions(-)

Since v2:
- Add patch explicitly checking for valid rings at mmap time. More
  of a documentation patch than anything, doesn't fix any current or
  future issues. But it makes it explicit that they have to be valid.
- Fix an issue with resizing when the sizes were identical, causing
  a cleared io_uring_params to be returned and liburing using that
  to re-mmap the rings. Ensure io_uring_params is filled in before
  getting copied back, even if nothing was done.
- Fix an issue with SQPOLL, it needs to get quiesced before we can
  proceed with the resize.
- Hold the mmap_sem and completion lock across the final part of
  the operation, where state is copied and the rings swapped. This
  prevents concurrent IO from accessing rings that are going away,
  and mmap from seeing any NULL or going-away mappings until the
  swap has been completed.
- Add some more comments.