lkml.org 
[lkml]   [2019]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: recvfrom/recvmsg performance and CONFIG_HARDENED_USERCOPY
From
Date


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.

\
 
 \ /
  Last update: 2019-12-06 17:20    [W:0.049 / U:21.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site