diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2025-09-16 15:28:02 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-09-16 12:37:21 -0600 |
| commit | 705d2ac7b2044f1ca05ba6033183151a04dbff4d (patch) | |
| tree | 4007929a276acf327d8aa62a19efad3856a54bef /include/uapi | |
| parent | 8fd08d8dda3c6c4e9f0b73acdcf8a1cf391b0c8f (diff) | |
io_uring/zcrx: allow synchronous buffer return
Returning buffers via a ring is performant and convenient, but it
becomes a problem when/if the user misconfigured the ring size and it
becomes full. Add a synchronous way to return buffers back to the page
pool via a new register opcode. It's supposed to be a reliable slow
path for refilling.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/uapi')
| -rw-r--r-- | include/uapi/linux/io_uring.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/uapi/linux/io_uring.h b/include/uapi/linux/io_uring.h index 1ce17c535944..a0cc1cc0dd01 100644 --- a/include/uapi/linux/io_uring.h +++ b/include/uapi/linux/io_uring.h @@ -689,6 +689,9 @@ enum io_uring_register_op { /* query various aspects of io_uring, see linux/io_uring/query.h */ IORING_REGISTER_QUERY = 35, + /* return zcrx buffers back into circulation */ + IORING_REGISTER_ZCRX_REFILL = 36, + /* this goes last */ IORING_REGISTER_LAST, @@ -1070,6 +1073,15 @@ struct io_uring_zcrx_ifq_reg { __u64 __resv[3]; }; +struct io_uring_zcrx_sync_refill { + __u32 zcrx_id; + /* the number of entries to return */ + __u32 nr_entries; + /* pointer to an array of struct io_uring_zcrx_rqe */ + __u64 rqes; + __u64 __resv[2]; +}; + #ifdef __cplusplus } #endif |
