From: Eric Dumazet <eric.dumazet@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <eric.dumazet@gmail.com>,
David Laight <David.Laight@ACULAB.COM>,
network dev <netdev@vger.kernel.org>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: recvfrom/recvmsg performance and CONFIG_HARDENED_USERCOPY
Date: Fri, 6 Dec 2019 08:19:03 -0800 [thread overview]
Message-ID: <fbac8306-247f-10f3-4067-14c0610b17d6@gmail.com> (raw)
In-Reply-To: <8b8a3cc1c3341912e0db5c55cd0e504dd4371588.camel@redhat.com>
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.
next prev parent reply other threads:[~2019-12-06 16:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-06 13:39 recvfrom/recvmsg performance and CONFIG_HARDENED_USERCOPY David Laight
2019-12-06 14:21 ` Eric Dumazet
2019-12-06 16:09 ` Paolo Abeni
2019-12-06 16:19 ` Eric Dumazet [this message]
2019-12-09 11:01 ` David Laight
2019-12-09 18:43 ` Andy Lutomirski
2019-12-10 10:21 ` David Laight
2019-12-09 15:05 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fbac8306-247f-10f3-4067-14c0610b17d6@gmail.com \
--to=eric.dumazet@gmail.com \
--cc=David.Laight@ACULAB.COM \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).