[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251026173434.3669748-1-dw@davidwei.uk>
Date: Sun, 26 Oct 2025 10:34:31 -0700
From: David Wei <dw@...idwei.uk>
To: io-uring@...r.kernel.org,
netdev@...r.kernel.org
Cc: Jens Axboe <axboe@...nel.dk>,
Pavel Begunkov <asml.silence@...il.com>
Subject: [PATCH v3 0/3] io_uring zcrx ifq sharing
Each ifq is bound to a HW RX queue with no way to share this across
multiple rings. It is possible that one ring will not be able to fully
saturate an entire HW RX queue due to userspace work. There are two ways
to handle more work:
1. Move work to other threads, but have to pay context switch overhead
and cold caches.
2. Add more rings with ifqs, but HW RX queues are a limited resource.
This patchset add a way for multiple rings to share the same underlying
src ifq that is bound to a HW RX queue. Rings with shared ifqs can issue
io_recvzc on zero copy sockets, just like the src ring.
Userspace are expected to create rings in separate threads and not
processes, such that all rings share the same address space. This is
because the sharing and synchronisation of refill rings is purely done
in userspace with no kernel involvement e.g. dst rings do not mmap the
refill ring. Also, userspace must distribute zero copy sockets steered
into the same HW RX queue across rings sharing the ifq.
v3:
- drop ifq->proxy
- use dec_and_test to clean up ifq
v2:
- split patch
David Wei (3):
io_uring/rsrc: rename and export io_lock_two_rings()
io_uring/zcrx: add refcount to struct io_zcrx_ifq
io_uring/zcrx: share an ifq between rings
include/uapi/linux/io_uring.h | 4 ++
io_uring/rsrc.c | 4 +-
io_uring/rsrc.h | 1 +
io_uring/zcrx.c | 92 +++++++++++++++++++++++++++++++++--
io_uring/zcrx.h | 2 +
5 files changed, 97 insertions(+), 6 deletions(-)
--
2.47.3
Powered by blists - more mailing lists