diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2026-01-20 20:47:40 +0000 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2026-01-22 15:47:23 -0700 |
| commit | 5247c034a67f5a93cc1faa15e9867eec5b22f38a (patch) | |
| tree | dafc8859ac3cc7eaa08dfe3641ba1c8818267717 /io_uring/io_uring.h | |
| parent | 0105b0562a5ed6374f06e5cd4246a3f1311a65a0 (diff) | |
| download | linux-5247c034a67f5a93cc1faa15e9867eec5b22f38a.tar.gz linux-5247c034a67f5a93cc1faa15e9867eec5b22f38a.tar.bz2 linux-5247c034a67f5a93cc1faa15e9867eec5b22f38a.zip | |
io_uring: introduce non-circular SQ
Outside of SQPOLL, normally SQ entries are consumed by the time the
submission syscall returns. For those cases we don't need a circular
buffer and the head/tail tracking, instead the kernel can assume that
entries always start from the beginning of the SQ at index 0. This patch
introduces a setup flag doing exactly that. It's a simpler and helps
to keeps SQEs hot in cache.
The feature is optional and enabled by setting IORING_SETUP_SQ_REWIND.
The flag is rejected if passed together with SQPOLL as it'd require
waiting for SQ before each submission. It also requires
IORING_SETUP_NO_SQARRAY, which can be supported but it's unlikely there
will be users, so leave more space for future optimisations.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.h')
| -rw-r--r-- | io_uring/io_uring.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/io_uring/io_uring.h b/io_uring/io_uring.h index 29b8f90fdabf..acdc39b9f8d6 100644 --- a/io_uring/io_uring.h +++ b/io_uring/io_uring.h @@ -69,7 +69,8 @@ struct io_ctx_config { IORING_SETUP_NO_SQARRAY |\ IORING_SETUP_HYBRID_IOPOLL |\ IORING_SETUP_CQE_MIXED |\ - IORING_SETUP_SQE_MIXED) + IORING_SETUP_SQE_MIXED |\ + IORING_SETUP_SQ_REWIND) #define IORING_ENTER_FLAGS (IORING_ENTER_GETEVENTS |\ IORING_ENTER_SQ_WAKEUP |\ |
