Re: [PATCH] io-uring: futex: cache io_futex_data than kfree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux