From: Jens Axboe <axboe@kernel.dk>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: "linux-block@vger.kernel.org" <linux-block@vger.kernel.org>
Subject: Re: [PATCH v2] block: only read from sqe on initial invocation of blkdev_uring_cmd()
Date: Wed, 6 May 2026 04:43:17 -0600 [thread overview]
Message-ID: <be3d5412-ec7c-4abf-b890-22c0b7295cc3@kernel.dk> (raw)
In-Reply-To: <CADUfDZq11PnyH5Vh8VjUzsV9Mxq6=0poGw--umMxccfwXiz54g@mail.gmail.com>
On 5/5/26 9:32 AM, Caleb Sander Mateos wrote:
> On Tue, May 5, 2026 at 12:38?AM Jens Axboe <axboe@kernel.dk> wrote:
>>
>> This passthrough helper currently only supports discards. Part of that
>> command is the start and length, which is read from the SQE. It does
>> so on every invocation, where it really should just make it stable
>> on the first invocation. This avoids needing to copy the SQE upfront,
>> as we only really need those two 8b values stored in our per-req
>> payload.
>
> Maybe I'm missing something, but how does this avoid the SQE copy?
> Won't io_uring_cmd_sqe_copy() still copy the SQE if the command issue
> is delayed by links/drain/forced async or if the initial issue returns
> EAGAIN? The code change looks fine to me, but I'm not sure I
> understand the motivation.
Because the alternative would be to copy it upfront and then using ->sqe
would always be fine. But we can just ensure start/len are stable. The
patch is about the latter, not adding any further copy avoidance. Yes if
you use async or it's a link or drained, prep will always copy it.
That's fine.
--
Jens Axboe
next prev parent reply other threads:[~2026-05-06 10:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-05 7:37 [PATCH v2] block: only read from sqe on initial invocation of blkdev_uring_cmd() Jens Axboe
2026-05-05 15:32 ` Caleb Sander Mateos
2026-05-06 10:43 ` Jens Axboe [this message]
2026-05-06 16:07 ` Caleb Sander Mateos
2026-05-06 16:09 ` 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=be3d5412-ec7c-4abf-b890-22c0b7295cc3@kernel.dk \
--to=axboe@kernel.dk \
--cc=csander@purestorage.com \
--cc=linux-block@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