From: Jesper Dangaard Brouer <brouer@redhat.com>
To: "Björn Töpel" <bjorn.topel@gmail.com>
Cc: "Paul Menzel" <pmenzel@molgen.mpg.de>,
"Björn Töpel" <bjorn.topel@intel.com>,
intel-wired-lan <intel-wired-lan@lists.osuosl.org>,
Netdev <netdev@vger.kernel.org>,
"Magnus Karlsson" <magnus.karlsson@gmail.com>,
"Karlsson, Magnus" <magnus.karlsson@intel.com>,
brouer@redhat.com
Subject: Re: [Intel-wired-lan] [PATCH] i40e: replace switch-statement with if-clause
Date: Mon, 21 Jan 2019 20:12:13 +0100 [thread overview]
Message-ID: <20190121201213.4cb33c97@redhat.com> (raw)
In-Reply-To: <CAJ+HfNhg=iZN2x7F0As_WtpiOsQZXNPts4-XSOXVRYRN--WrFw@mail.gmail.com>
On Mon, 21 Jan 2019 17:53:45 +0100
Björn Töpel <bjorn.topel@gmail.com> wrote:
> > If that jump tables are a common problem, I wonder, why the compiler
> > cannot be adapted to generate better performing code or an option passed
> > to the compiler.
> >
>
> It might make sense to use -fno-jump-tables or a better value for the
> case-values-threshold param for the i40e code. However, doing that
> would require a much broader testing, since there are a number of
> different places where a switch-statement is used. And depending on
> the context, a jump table might still be a better option.
I recently found out that it is possible to disable GCC attributes per
function basis. See how I played with it here:
https://github.com/xdp-project/xdp-project/blob/master/areas/dma/dma01_test_hellwig_direct_dma.org#investigate-overhead-of-bpf-indirect-retpoline
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2019-01-21 19:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-21 16:33 [PATCH] i40e: replace switch-statement with if-clause bjorn.topel
2019-01-21 16:42 ` [Intel-wired-lan] " Paul Menzel
2019-01-21 16:53 ` Björn Töpel
2019-01-21 19:12 ` Jesper Dangaard Brouer [this message]
2019-01-22 6:51 ` Björn Töpel
2019-01-21 18:59 ` Jesper Dangaard Brouer
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=20190121201213.4cb33c97@redhat.com \
--to=brouer@redhat.com \
--cc=bjorn.topel@gmail.com \
--cc=bjorn.topel@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=magnus.karlsson@gmail.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pmenzel@molgen.mpg.de \
/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).