From: Gabriel Krisman Bertazi <krisman@suse.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: io-uring@vger.kernel.org
Subject: Re: [PATCH] io_uring/futex: Recycle ifd on failure
Date: Wed, 02 Sep 2026 19:41:16 -0300 [thread overview]
Message-ID: <87v78n5l9v.fsf@mailhost.krisman.be> (raw)
In-Reply-To: <79a23f41-0263-435e-91c7-477d742c95f9@kernel.dk>
Jens Axboe <axboe@kernel.dk> writes:
> On 9/2/26 11:27 AM, Gabriel Krisman Bertazi wrote:
>> The failure path doesn't recycle the ifd on FUTEX_WAIT for no good
>> reason. If we move the free above done_unlock, we are even already
>> holding the submit lock. Recycle it.
>
> Does it matter? For performance, it should not, unless you have a
> benchmark that deliberately ends up with futex_wait_setup() failing.
> Any normal/fast path will have all of these succeed.
>
> Is the motivation just to unify the cleanup, or..?
Because recycling is good for the world :)
It is a cleanup. A todo in my list is recycling objects as much as we
can. for instance, in the generic cleanup path we could be recycling for
various objects. I'll send it as a larger series.
--
Gabriel Krisman Bertazi
next prev parent reply other threads:[~2026-09-02 22:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 17:27 [PATCH] io_uring/futex: Recycle ifd on failure Gabriel Krisman Bertazi
2026-09-02 22:27 ` Jens Axboe
2026-09-02 22:41 ` Gabriel Krisman Bertazi [this message]
2026-09-02 22:41 ` Gabriel Krisman Bertazi
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=87v78n5l9v.fsf@mailhost.krisman.be \
--to=krisman@suse.de \
--cc=axboe@kernel.dk \
--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