From: Jens Axboe <axboe@kernel.dk>
To: Caleb Sander Mateos <csander@purestorage.com>,
Pavel Begunkov <asml.silence@gmail.com>
Cc: io-uring@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] io_uring/wq: avoid indirect do_work/free_work calls
Date: Sat, 29 Mar 2025 13:07:04 -0600 [thread overview]
Message-ID: <9d8f1460-6317-4e8a-ba90-53e35b41f235@kernel.dk> (raw)
In-Reply-To: <20250329161527.3281314-1-csander@purestorage.com>
On 3/29/25 10:15 AM, Caleb Sander Mateos wrote:
> struct io_wq stores do_work and free_work function pointers which are
> called on each work item. But these function pointers are always set to
> io_wq_submit_work and io_wq_free_work, respectively. So remove these
> function pointers and just call the functions directly.
Was going to say that the indirect call here is not something
I'd be worried about in terms of performance, but it's also kind of
pointless to have them when we have just the single do_work/free_work
callback. And hence it'd reduce the struct footprint, which is always
useful. So yeah, I do think the change makes sense.
--
Jens Axboe
next prev parent reply other threads:[~2025-03-29 19:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-29 16:15 [PATCH] io_uring/wq: avoid indirect do_work/free_work calls Caleb Sander Mateos
2025-03-29 19:07 ` Jens Axboe [this message]
2025-03-31 19:06 ` 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=9d8f1460-6317-4e8a-ba90-53e35b41f235@kernel.dk \
--to=axboe@kernel.dk \
--cc=asml.silence@gmail.com \
--cc=csander@purestorage.com \
--cc=io-uring@vger.kernel.org \
--cc=linux-kernel@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