[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <7d927254-6e75-43c3-be17-6e449395ff0d@kernel.dk>
Date: Tue, 4 Feb 2025 12:45:29 -0700
From: Jens Axboe <axboe@...nel.dk>
To: Pavel Begunkov <asml.silence@...il.com>,
Max Kellermann <max.kellermann@...os.com>, io-uring@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/8] io_uring: cache io_kiocb->flags in variable
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
Powered by blists - more mailing lists