Messages in this thread | | | Subject | Re: recvfrom/recvmsg performance and CONFIG_HARDENED_USERCOPY | From | Eric Dumazet <> | Date | Fri, 6 Dec 2019 08:19:03 -0800 |
| |
On 12/6/19 8:09 AM, Paolo Abeni wrote:
> Oh, nice! I though the compiler was smart enough to avoid the indirect > call with the current code, but it looks like that least gcc 9.2.1 is > not. > > Thanks for pointing that out! > > In this specific scenario I think the code you propose above is better > than INDIRECT_CALL. > > Would you submit the patch formally?
Certainly, although I am not sure this will be enough to close the gap between recvmsg() and recvfrom() :)
Also I was wondering if a likely() or unlikely() clause would make sense.
This could prevent an over zealous compiler optimizer to put back the indirect call that we tried to avoid.
| |