public inbox for io-uring@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Keith Busch <kbusch@kernel.org>
Cc: Caleb Sander Mateos <csander@purestorage.com>, io-uring@vger.kernel.org
Subject: Re: [PATCHSET v2 0/8] Add support for mixed sized CQEs
Date: Thu, 21 Aug 2025 11:47:33 -0600	[thread overview]
Message-ID: <1bbb3425-557d-4c6b-be41-2ae67336e413@kernel.dk> (raw)
In-Reply-To: <aKdZ8TUE811CBrSn@kbusch-mbp>

On 8/21/25 11:40 AM, Keith Busch wrote:
> On Thu, Aug 21, 2025 at 11:12:28AM -0600, Jens Axboe wrote:
>>
>> For the SQE case, I think it's a bit different. At least the cases I
>> know of, it's mostly 100% 64b SQEs or 128b SQEs. I'm certainly willing
>> to be told otherwise! Because that is kind of the key question that
>> needs answering before even thinking about doing that kind of work.
> 
> The main use case I can think of is if an application allocates one ring
> for uring_cmd with the 128b SQEs, and then a separate ring for normal
> file and network stuff. Mixed SQE's would allow that application to have
> just one ring without being wasteful, but I'm just not sure if the
> separate rings is undesirable enough to make the effort worth it.

Indeed! And like Caleb mentioned, their use case already does this in
fact, just passthrough with housekeeping buffer commands.

>> But yes, it could be supported, and Keith (kind of) signed himself up to
>> do that. One oddity I see on that side is that while with CQE32 the
>> kernel can manage the potential wrap-around gap, for SQEs that's
>> obviously on the application to do. That could just be a NOP or
>> something like that, but you do need something to fill/skip that space.
>> I guess that could be as simple as having an opcode that is simply "skip
>> me", so on the kernel side it'd be easy as it'd just drop it on the
>> floor. You still need to app side to fill one, however, and then deal
>> with "oops SQ ring is now full" too.
> 
> Yep, I think it's doable, and your implementation for mixed CQEs
> provides a great reference. I trust we can get liburing using it
> correctly, but would be afraid for anyone not using the library.

That's the same with the mixed CQEs though - as you can see from the
liburing changes, it's really not hard to support. If you're using the
raw interface, well then things are already a bit more complicated for
you. Not too worried about that use case.

-- 
Jens Axboe

  reply	other threads:[~2025-08-21 17:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-21 14:18 [PATCHSET v2 0/8] Add support for mixed sized CQEs Jens Axboe
2025-08-21 14:18 ` [PATCH 1/8] io_uring: remove io_ctx_cqe32() helper Jens Axboe
2025-08-21 14:18 ` [PATCH 2/8] io_uring: add UAPI definitions for mixed CQE postings Jens Axboe
2025-08-21 14:18 ` [PATCH 3/8] io_uring/fdinfo: handle mixed sized CQEs Jens Axboe
2025-08-21 14:18 ` [PATCH 4/8] io_uring/trace: support completion tracing of mixed 32b CQEs Jens Axboe
2025-08-21 14:18 ` [PATCH 5/8] io_uring: add support for IORING_SETUP_CQE_MIXED Jens Axboe
2025-08-21 14:18 ` [PATCH 6/8] io_uring/nop: " Jens Axboe
2025-08-21 14:18 ` [PATCH 7/8] io_uring/uring_cmd: " Jens Axboe
2025-08-21 14:18 ` [PATCH 8/8] io_uring/zcrx: " Jens Axboe
2025-08-21 17:02 ` [PATCHSET v2 0/8] Add support for mixed sized CQEs Caleb Sander Mateos
2025-08-21 17:12   ` Jens Axboe
2025-08-21 17:40     ` Keith Busch
2025-08-21 17:47       ` Jens Axboe [this message]
2025-08-21 17:41     ` Caleb Sander Mateos
2025-08-21 17:46       ` Jens Axboe
2025-08-21 18:19         ` Caleb Sander Mateos

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=1bbb3425-557d-4c6b-be41-2ae67336e413@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --cc=io-uring@vger.kernel.org \
    --cc=kbusch@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