From: Pavel Begunkov <asml.silence@gmail.com>
To: Gabriel Krisman Bertazi <krisman@suse.de>
Cc: io-uring@vger.kernel.org, axboe@kernel.dk
Subject: Re: [PATCH v3 1/1] io_uring: introduce non-circular SQ
Date: Wed, 21 Jan 2026 21:55:18 +0000 [thread overview]
Message-ID: <80368e4b-9148-40d0-bd52-1507fef68055@gmail.com> (raw)
In-Reply-To: <87a4y6esjj.fsf@mailhost.krisman.be>
On 1/21/26 18:20, Gabriel Krisman Bertazi wrote:
> Pavel Begunkov <asml.silence@gmail.com> writes:
>
>> 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.
>
> This patch got me wondering if it would make sense to have a way to
> point to different buffers as the SQE map and execute them. This way
> the user could initialize a set of operations in a specific region of
> the sq ring (or a separate buffer) once and have them repeatedly
> executed with a single command, similar to a procedure call.
>
> Say we have a preloaded ring with some sqes to accept a new connection,
> and immediately some fixed data, etc. When I want to run it, I push a
> SQE OP_EXECUTE pointing to this buffer to the "main" ring and io_uring
> will queue everything in this pre-registered buffer.
>
> I imagine it would save nothing beyond SQ initialization. just curious
> if you see a use case for something like this?
You already can do it with the sq array. Never heard of anyone
using it, but liburing never exposed it to users either.
--
Pavel Begunkov
next prev parent reply other threads:[~2026-01-21 21:55 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 20:47 [PATCH v3 1/1] io_uring: introduce non-circular SQ Pavel Begunkov
2026-01-21 14:59 ` Jens Axboe
2026-01-21 18:20 ` Gabriel Krisman Bertazi
2026-01-21 21:55 ` Pavel Begunkov [this message]
2026-01-22 16:18 ` Gabriel Krisman Bertazi
2026-01-22 22:59 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=80368e4b-9148-40d0-bd52-1507fef68055@gmail.com \
--to=asml.silence@gmail.com \
--cc=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
--cc=krisman@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox