All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gabriel Krisman Bertazi <krisman@suse.de>
To: Pavel Begunkov <asml.silence@gmail.com>
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 13:20:48 -0500	[thread overview]
Message-ID: <87a4y6esjj.fsf@mailhost.krisman.be> (raw)
In-Reply-To: <b7a5502ee3da7ef096455498cd1ad3efbdbee288.1768940337.git.asml.silence@gmail.com> (Pavel Begunkov's message of "Tue, 20 Jan 2026 20:47:40 +0000")

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?

-- 
Gabriel Krisman Bertazi

  parent reply	other threads:[~2026-01-21 18:20 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 [this message]
2026-01-21 21:55   ` Pavel Begunkov
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=87a4y6esjj.fsf@mailhost.krisman.be \
    --to=krisman@suse.de \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.