]> git.ipfire.org Git - thirdparty/linux.git/commit
io_uring/zcrx: add sync refill queue flushing
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 13 Nov 2025 10:46:13 +0000 (10:46 +0000)
committerJens Axboe <axboe@kernel.dk>
Thu, 13 Nov 2025 18:19:37 +0000 (11:19 -0700)
commit475eb39b00478b1898bc9080344dcd8e86c53c7a
treeb2d6b409f1cef592f7301f50933e127983400fa8
parentd663976dad68de9b2e3df59cc31f0a24ee4c4511
io_uring/zcrx: add sync refill queue flushing

Add an zcrx interface via IORING_REGISTER_ZCRX_CTRL that forces the
kernel to flush / consume entries from the refill queue. Just as with
the IORING_REGISTER_ZCRX_REFILL attempt, the motivation is to address
cases where the refill queue becomes full, and the user can't return
buffers and needs to stash them. It's still a slow path, and the user
should size refill queue appropriately, but it should be helpful for
handling temporary traffic spikes and other unpredictable conditions.

The interface is simpler comparing to ZCRX_REFILL as it doesn't need
temporary refill entry arrays and gives natural batching, whereas
ZCRX_REFILL requires even more user logic to be somewhat efficient.

Also, add a structure for the operation. It's not currently used but
can serve for future improvements like limiting the number of buffers to
process, etc.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/uapi/linux/io_uring.h
io_uring/zcrx.c