Re: [PATCH 7/8] io_uring: cache io_kiocb->flags in variable

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

 



On 2/4/25 5:07 AM, Pavel Begunkov wrote:
> On 1/29/25 19:11, Pavel Begunkov wrote:
>> On 1/28/25 13:39, Max Kellermann wrote:
>>> This eliminates several redundant reads, some of which probably cannot
>>> be optimized away by the compiler.
>>
>> Let's not, it hurts readability with no clear benefits. In most cases
>> the compiler will be able to optimise it just where it matters, and
>> in cold paths we're comparing the overhead of reading a cached variable
>> with taking locks and doing indirect calls, and even then it'd likely
>> need to be saved onto the stack and loaded back.
>>
>> The only place where it might be worth it is io_issue_sqe(), and
>> even then I'd doubt it.
> 
> Jens, I'd suggest to drop it out of the tree, for the reasons above.

Yep I'll drop it, thanks.

-- 
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