public inbox for [email protected]
 help / color / mirror / Atom feed
From: Jens Axboe <[email protected]>
To: Sidong Yang <[email protected]>
Cc: io-uring <[email protected]>
Subject: Re: [PATCH] io-uring: futex: cache io_futex_data than kfree
Date: Fri, 24 Jan 2025 06:37:13 -0700	[thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>

On 1/23/25 6:15 PM, Sidong Yang wrote:
> On Thu, Jan 23, 2025 at 06:36:06AM -0700, Jens Axboe wrote:
> 
> Hi, Jens.
> Thanks for review!
> 
>> On 1/23/25 3:50 AM, Sidong Yang wrote:
>>> If futex_wait_setup() fails in io_futex_wait(), Old code just releases
>>> io_futex_data. This patch tries to cache io_futex_data before kfree.
>>
>> It's not that the patch is incorrect, but:
>>
>> 1) This is an error path, surely we do not care about caching in
>>    that case. If it's often hit, then the application would be buggy.
>>
>> 2) If you're going to add an io_free_ifd() helper, then at least use it
>>    for the normal case too that still open-codes it.
> 
> Agreed, So this patch could be make it buggy. You can drop this patch. I'll
> find another task to work on. 

It won't make it buggy, it's just a bit questionnable if it's worth
doing. And if it is, then it should have io_free_ifd() being used in the
other place that puts to the cache as well, to make it complete.

-- 
Jens Axboe

  reply	other threads:[~2025-01-24 13:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-23 10:50 [PATCH] io-uring: futex: cache io_futex_data than kfree Sidong Yang
2025-01-23 13:36 ` Jens Axboe
2025-01-24  1:15   ` Sidong Yang
2025-01-24 13:37     ` Jens Axboe [this message]
2025-01-24 15:08       ` Sidong Yang

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] \
    /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