All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sidong Yang <sidong.yang@furiosa.ai>
To: Jens Axboe <axboe@kernel.dk>
Cc: io-uring <io-uring@vger.kernel.org>
Subject: Re: [PATCH] io-uring: futex: cache io_futex_data than kfree
Date: Fri, 24 Jan 2025 10:15:18 +0900	[thread overview]
Message-ID: <Z5LppkEQ9tGdfwrX@sidongui-MacBookPro.local> (raw)
In-Reply-To: <a366bb4b-dd8c-486e-91b5-46dad940e603@kernel.dk>

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. 

Thanks,
Sidong
> 
> -- 
> Jens Axboe
> 

  reply	other threads:[~2025-01-24  1:15 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 [this message]
2025-01-24 13:37     ` Jens Axboe
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 \
    --in-reply-to=Z5LppkEQ9tGdfwrX@sidongui-MacBookPro.local \
    --to=sidong.yang@furiosa.ai \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.