All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET RFC 0/3] Add support for ring resizing
@ 2024-10-22  2:08 Jens Axboe
  2024-10-22  2:08 ` [PATCH 1/3] io_uring: move max entry definition and ring sizing into header Jens Axboe
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Jens Axboe @ 2024-10-22  2:08 UTC (permalink / raw)
  To: io-uring

Hi,

Something that's come up several times over the years is how to deal
with ring sizing. The SQ ring sizing is usually trivial - it just
controls the batch submit size, and usually it's not that difficult
to just submit if the app fails to get a free SQE.

For the CQ ring, it's a different story. For networked workloads, it
can be hard to appropriately size the CQ ring without knowing exactly
how busy a given ring will be. This leads to applications grossly
over-sizing the ring, just in case, which is wasteful.

Here's a stab at supporting ring resizing. It supports resizing of
both rings, SQ and CQ, as it's really no different than just doing
the CQ ring itself. liburing has a 'resize-rings' branch with a bit
of support code, and a test case:

https://git.kernel.dk/cgit/liburing/log/?h=resize-rings

and these patches can also be found here:

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

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

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCHSET v2 0/3] Add support for ring resizing
@ 2024-10-23 15:59 Jens Axboe
  2024-10-23 15:59 ` [PATCH 3/3] io_uring/register: add IORING_REGISTER_RESIZE_RINGS Jens Axboe
  0 siblings, 1 reply; 7+ messages in thread
From: Jens Axboe @ 2024-10-23 15:59 UTC (permalink / raw)
  To: io-uring

Hi,

Here's v2 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/register.c           | 177 ++++++++++++++++++++++++++++++++++
 4 files changed, 232 insertions(+), 38 deletions(-)

Since v1:
- For SINGLE_ISSUER, limit resize task to owning task
- Fail the resize if the operation would result in CQ or SQ overflow
- Expand liburing test cases quite a bit

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-10-24 16:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-22  2:08 [PATCHSET RFC 0/3] Add support for ring resizing Jens Axboe
2024-10-22  2:08 ` [PATCH 1/3] io_uring: move max entry definition and ring sizing into header Jens Axboe
2024-10-22  2:08 ` [PATCH 2/3] io_uring: abstract out a bit of the ring filling logic Jens Axboe
2024-10-22  2:08 ` [PATCH 3/3] io_uring/register: add IORING_REGISTER_RESIZE_RINGS Jens Axboe
2024-10-24 15:47 ` [PATCHSET RFC 0/3] Add support for ring resizing Jann Horn
2024-10-24 16:05   ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2024-10-23 15:59 [PATCHSET v2 " Jens Axboe
2024-10-23 15:59 ` [PATCH 3/3] io_uring/register: add IORING_REGISTER_RESIZE_RINGS Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.