io_uring zcrx ifq sharing
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest5 patches 2 repliesIn review
- v4 posting 2/212 patches 3 repliesSuperseded
- v4 posting 1/28 patches 3 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 3 patches | 8 replies | Superseded | |
| v2 | 5 patches | 7 replies | Superseded |
Changes in v6 from the cover letter
- removed ifq refcounting that merged separately
- fill in struct io_uring_zcrx_offsets
- shorten functions + structs
- move ctx flags checks from export to import
Patches in v6 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | io_uring/zcrx: count zcrx usersio_uring/ io_uring/ | +7 | 0 replies | |
| 2/5 | io_uring/zcrx: move io_zcrx_scrub() and dependencies upio_uring/ | +42 | 0 replies | |
| 3/5 | io_uring/zcrx: export zcrx via a fileinclude/ io_uring/ | +54 | 0 replies | |
| 4/5 | io_uring/zcrx: add io_fill_zcrx_offsets()io_uring/ | +9 | 0 replies | |
| 5/5 | io_uring/zcrx: share an ifq between ringsinclude/ io_uring/ | +65 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v6 yet.
Cover letter [PATCH v6 0/5] 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.
v6:
- removed ifq refcounting that merged separately
- fill in struct io_uring_zcrx_offsets
- shorten functions + structs
- move ctx flags checks from export to import
v5:
- remove sync refill api
- pp mp taking ref on ifq
- add ifq export to file
- implement sharing by importing ifq fd
v4:
- lock rings in seq instead of both
- drop export io_lock_two_rings()
- break circular ref between ifq and ring ctx
- remove io_shutdown_zcrx_ifqs()
- copy reg struct to user before writing ifq to ctx->zcrx_ctxs
v3:
- drop ifq->proxy
- use dec_and_test to clean up ifq
v2:
- split patch
David Wei (3):
io_uring/zcrx: move io_zcrx_scrub() and dependencies up io_uring/zcrx: add io_fill_zcrx_offsets() io_uring/zcrx: share an ifq between rings
Pavel Begunkov (2):
io_uring/zcrx: count zcrx users
io_uring/zcrx: export zcrx via a file
include/uapi/linux/io_uring.h | 5 + io_uring/zcrx.c | 218 ++++++++++++++++++++++++++-------- io_uring/zcrx.h | 2 + 3 files changed, 173 insertions(+), 52 deletions(-)
Signature · 1 line
2.47.3