From: Keith Busch <[email protected]>
To: Jens Axboe <[email protected]>
Cc: io-uring <[email protected]>
Subject: Re: [PATCH v2] io_uring/rw: cleanup io_rw_done()
Date: Wed, 10 Jan 2024 11:46:21 -0700 [thread overview]
Message-ID: <ZZ7l_VnxD0D4snKO@kbusch-mbp> (raw)
In-Reply-To: <[email protected]>
On Wed, Jan 10, 2024 at 11:38:02AM -0700, Jens Axboe wrote:
> This originally came from the aio side, and it's laid out rather oddly.
> The common case here is that we either get -EIOCBQUEUED from submitting
> an async request, or that we complete the request correctly with the
> given number of bytes. Handling the odd internal restart error codes
> is not a common operation.
>
> Lay it out a bit more optimally that better explains the normal flow,
> and switch to avoiding the indirect call completely as this is our
> kiocb and we know the completion handler can only be one of two
> possible variants. While at it, move it to where it belongs in the
> file, with fellow end IO helpers.
>
> Outside of being easier to read, this also reduces the text size of the
> function by 24 bytes for me on arm64.
>
> Signed-off-by: Jens Axboe <[email protected]>
Looks good!
Reviewed-by: Keith Busch <[email protected]>
prev parent reply other threads:[~2024-01-10 18:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-10 18:38 [PATCH v2] io_uring/rw: cleanup io_rw_done() Jens Axboe
2024-01-10 18:46 ` Keith Busch [this message]
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=ZZ7l_VnxD0D4snKO@kbusch-mbp \
[email protected] \
[email protected] \
[email protected] \
/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