From: Jens Axboe <axboe@kernel.dk>
To: Pavel Begunkov <asml.silence@gmail.com>, io-uring@vger.kernel.org
Subject: Re: [PATCH liburing 0/2] Add support for IORING_SETUP_SQ_REWIND
Date: Sat, 24 Jan 2026 08:12:38 -0700 [thread overview]
Message-ID: <30ee2371-f82f-4b29-9276-71b8cc12b87d@kernel.dk> (raw)
In-Reply-To: <9c10b8e7-d64c-491a-96b3-fc26863e0dbf@gmail.com>
On 1/24/26 3:44 AM, Pavel Begunkov wrote:
> On 1/23/26 19:04, Jens Axboe wrote:
>> On 1/23/26 7:14 AM, Pavel Begunkov wrote:
>>> On 1/22/26 23:05, Jens Axboe wrote:
>>>> On 1/22/26 3:59 PM, Jens Axboe wrote:
>>>>>
>>>>> On Wed, 21 Jan 2026 22:23:20 +0000, Pavel Begunkov wrote:
>>>>>> Add liburing support and tests for IORING_SETUP_SQ_REWIND.
>>>>>>
>>>>>> Pavel Begunkov (2):
>>>>>> src/queue: Add support for non circular SQ
>>>>>> tests: add SETUP_SQ_REWIND tests
>>>>>>
>>>>>> src/include/liburing.h | 5 ++++-
>>>>>> src/include/liburing/io_uring.h | 12 ++++++++++++
>>>>>> src/queue.c | 5 +++++
>>>>>> test/test.h | 2 ++
>>>>>> 4 files changed, 23 insertions(+), 1 deletion(-)
>>>>>>
>>>>>> [...]
>>>>>
>>>>> Applied, thanks!
>>>>>
>>>>> [1/2] src/queue: Add support for non circular SQ
>>>>> commit: c22129cf0b8c936eb478d920ef84e53d89c6a5cc
>>>>> [2/2] tests: add SETUP_SQ_REWIND tests
>>>>> commit: 346c063d16bda52f02d00feb744aafe35b4002a9
>>>>
>>>> Hmm I do think you're missing some spots though, no?
>>>>
>>>> diff --git a/src/include/liburing.h b/src/include/liburing.h
>>>> index 987b28aaf99e..016be1e80ef2 100644
>>>> --- a/src/include/liburing.h
>>>> +++ b/src/include/liburing.h
>>>> @@ -1702,8 +1702,13 @@ IOURINGINLINE unsigned io_uring_load_sq_head(const struct io_uring *ring)
>>>> IOURINGINLINE unsigned io_uring_sq_ready(const struct io_uring *ring)
>>>> LIBURING_NOEXCEPT
>>>> {
>>>> + unsigned head = 0;
>>>> +
>>>> + if (!(ring->flags & IORING_SETUP_SQ_REWIND))
>>>> + head = io_uring_load_sq_head(ring);
>>>
>>> The head should already be zero. Actually, sounds like the get_sqe
>>> hunk from the patch is not needed either.
>>
>> Yeah agree, I think they are both false alarms. Might warrant a comment
>> though. Or maybe we just fold it into io_uring_load_sq_head()?
>
> What I'm implying is that the
>
> + if (!(ring->flags & IORING_SETUP_SQ_REWIND))
> + head = io_uring_load_sq_head(ring);
> +
>
> change from the original patch for normal 64B _io_uring_get_sqe()
> doesn't seem to be necessary. I need to take a look, but that's
> a good thing since the function is somewhat frequently called and
> inlined.
>
> That would leave __io_uring_flush_sq() to be the only place
> checking the flag, so maybe comments would better to be put
> there.
If you have time, would you mind checking the current repo and sending a
patch? Looks like I messed up a bit and committed some of these bits
with:
commit 5d1c94f754f3bca156d84b4ebcaf2f211dcd09f2
Author: Jens Axboe <axboe@kernel.dk>
Date: Thu Jan 22 17:11:53 2026 -0700
test/sqe-mixed-noop: add SQ_REWIND testing
inadvertently as I was doing some testing.
--
Jens Axboe
next prev parent reply other threads:[~2026-01-24 15:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-21 22:23 [PATCH liburing 0/2] Add support for IORING_SETUP_SQ_REWIND Pavel Begunkov
2026-01-21 22:23 ` [PATCH liburing 1/2] src/queue: Add support for non circular SQ Pavel Begunkov
2026-01-21 22:23 ` [PATCH liburing 2/2] tests: add SETUP_SQ_REWIND tests Pavel Begunkov
2026-01-22 22:59 ` [PATCH liburing 0/2] Add support for IORING_SETUP_SQ_REWIND Jens Axboe
2026-01-22 23:05 ` Jens Axboe
2026-01-23 14:14 ` Pavel Begunkov
2026-01-23 19:04 ` Jens Axboe
2026-01-24 10:44 ` Pavel Begunkov
2026-01-24 15:12 ` Jens Axboe [this message]
2026-01-24 16:37 ` Pavel Begunkov
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=30ee2371-f82f-4b29-9276-71b8cc12b87d@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox