From: Jens Axboe <[email protected]>
To: Caleb Sander Mateos <[email protected]>,
Pavel Begunkov <[email protected]>
Cc: [email protected], [email protected]
Subject: Re: [PATCH] io_uring: pass struct io_tw_state by value
Date: Wed, 12 Feb 2025 07:33:03 -0700 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 2/11/25 2:45 PM, Caleb Sander Mateos wrote:
> 8e5b3b89ecaf ("io_uring: remove struct io_tw_state::locked") removed the
> only field of io_tw_state but kept it as a task work callback argument
> to "forc[e] users not to invoke them carelessly out of a wrong context".
> Passing the struct io_tw_state * argument adds a few instructions to all
> callers that can't inline the functions and see the argument is unused.
>
> So pass struct io_tw_state by value instead. Since it's a 0-sized value,
> it can be passed without any instructions needed to initialize it.
>
> Also add a comment to struct io_tw_state to explain its purpose.
This is nice, reduces the code generated. It'll conflict with the
fix that Pavel posted, but I can just mangle this one once I get
the 6.15 branch rebased on top of -rc3. No need to send a v2.
--
Jens Axboe
next prev parent reply other threads:[~2025-02-12 14:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-11 21:45 [PATCH] io_uring: pass struct io_tw_state by value Caleb Sander Mateos
2025-02-12 13:31 ` Pavel Begunkov
2025-02-12 14:33 ` Jens Axboe [this message]
2025-02-12 14:49 ` Pavel Begunkov
2025-02-12 14:50 ` Jens Axboe
2025-02-13 16:54 ` 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 \
[email protected] \
[email protected] \
[email protected] \
[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