From: Jens Axboe <axboe@kernel.dk>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: io-uring@vger.kernel.org
Subject: Re: [PATCH 4/4] io_uring/uring_cmd: implement ->sqe_copy() to avoid unnecessary copies
Date: Fri, 6 Jun 2025 16:08:49 -0600 [thread overview]
Message-ID: <16075197-2561-4eef-bf4a-c50734021267@kernel.dk> (raw)
In-Reply-To: <98a6907f-b9e7-4331-83cc-855a64bb1eaf@kernel.dk>
On 6/6/25 3:05 PM, Jens Axboe wrote:
>> Is it necessary to pass the sqe? Wouldn't it always be ioucmd->sqe?
>> Presumably any other opcode that implements ->sqe_copy() would also
>> have the sqe pointer stashed somewhere. Seems like it would simplify
>> the core io_uring code a bit not to have to thread the sqe through
>> several function calls.
>
> It's not necessary, but I would rather get rid of needing to store an
> SQE since that is a bit iffy than get rid of passing the SQE. When it
> comes from the core, you _know_ it's going to be valid. I feel like you
> need a fairly intimate understanding of io_uring issue flow to make any
> judgement on this, if you were adding an opcode and defining this type
> of handler.
Actually did go that route anyway, because we still need to stash it.
And if we do go that route, then we can keep all the checking in the
core and leave the handler just a basic copy with a void return. Which
is pretty nice.
Anyway, checkout v3 and see what you thing.
--
Jens Axboe
next prev parent reply other threads:[~2025-06-06 22:08 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 19:40 [PATCHSET RFC v2 0/4] uring_cmd copy avoidance Jens Axboe
2025-06-05 19:40 ` [PATCH 1/4] io_uring: add IO_URING_F_INLINE issue flag Jens Axboe
2025-06-06 17:31 ` Caleb Sander Mateos
2025-06-06 21:02 ` Jens Axboe
2025-06-05 19:40 ` [PATCH 2/4] io_uring: add struct io_cold_def->sqe_copy() method Jens Axboe
2025-06-05 20:05 ` Jens Axboe
2025-06-06 17:36 ` Caleb Sander Mateos
2025-06-06 21:01 ` Jens Axboe
2025-06-05 19:40 ` [PATCH 3/4] io_uring/uring_cmd: get rid of io_uring_cmd_prep_setup() Jens Axboe
2025-06-06 17:37 ` Caleb Sander Mateos
2025-06-05 19:40 ` [PATCH 4/4] io_uring/uring_cmd: implement ->sqe_copy() to avoid unnecessary copies Jens Axboe
2025-06-06 17:39 ` Caleb Sander Mateos
2025-06-06 21:05 ` Jens Axboe
2025-06-06 22:08 ` Jens Axboe [this message]
2025-06-06 22:09 ` Caleb Sander Mateos
2025-06-06 23:53 ` Jens Axboe
2025-06-06 17:29 ` [PATCHSET RFC v2 0/4] uring_cmd copy avoidance Caleb Sander Mateos
2025-06-06 17:32 ` Jens Axboe
-- strict thread matches above, loose matches on Subject: below --
2025-06-06 21:54 [PATCHSET v3 " Jens Axboe
2025-06-06 21:54 ` [PATCH 4/4] io_uring/uring_cmd: implement ->sqe_copy() to avoid unnecessary copies Jens Axboe
2025-06-07 0:50 ` Caleb Sander Mateos
2025-06-09 17:36 [PATCHSET v4 0/4] uring_cmd copy avoidance Jens Axboe
2025-06-09 17:36 ` [PATCH 4/4] io_uring/uring_cmd: implement ->sqe_copy() to avoid unnecessary copies Jens Axboe
2025-06-09 21:54 ` Caleb Sander Mateos
2025-06-10 13:35 ` 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=16075197-2561-4eef-bf4a-c50734021267@kernel.dk \
--to=axboe@kernel.dk \
--cc=csander@purestorage.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