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: Sat, 25 Jan 2025 00:08:26 +0900 [thread overview]
Message-ID: <Z5Os6m-GLEkBRb8G@sidongui-MacBookPro.local> (raw)
In-Reply-To: <5bc2877a-7125-48e1-9dd7-6497c3bd5d5d@kernel.dk>
On Fri, Jan 24, 2025 at 06:37:13AM -0700, Jens Axboe wrote:
> 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.
I found that io_free_ifd() could be used in io_futex_complete(). It needs same
routine that try to cache or kfree. Is it good to make v2 includes changing it?
>
> --
> Jens Axboe
prev parent reply other threads:[~2025-01-24 15:08 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
2025-01-24 15:08 ` Sidong Yang [this message]
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=Z5Os6m-GLEkBRb8G@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.