lkml.org 
[lkml]   [2022]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH net-next 02/11] udp/ipv6: refactor udpv6_sendmsg udplite checks
From
On 4/28/22 15:09, Paolo Abeni wrote:
> On Thu, 2022-04-28 at 11:56 +0100, Pavel Begunkov wrote:
>> Don't save a IS_UDPLITE() result in advance but do when it's really
>> needed, so it doesn't store/load it from the stack. Same for resolving
>> the getfrag callback pointer.
>
> It's quite unclear to me if this change brings really any performance
> benefit. The end results will depend a lot on the optimization
> performed by the compiler, and IMHO the code looks better before this
> modifications.

There is a lot of code and function calls between IS_UDPLITE() and
use sites, because of alias analysis the compiler will be forced
to call it early in the function and store something on stack.
I don't believe it will be able to keep in a register. But it's
not a problem to drop it

--
Pavel Begunkov

\
 
 \ /
  Last update: 2022-04-28 17:14    [W:0.044 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site