lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 22 Jan 2019 07:51:32 +0100
From:   Björn Töpel <bjorn.topel@...il.com>
To:     Jesper Dangaard Brouer <brouer@...hat.com>
Cc:     Paul Menzel <pmenzel@...gen.mpg.de>,
        Björn Töpel <bjorn.topel@...el.com>,
        intel-wired-lan <intel-wired-lan@...ts.osuosl.org>,
        Netdev <netdev@...r.kernel.org>,
        Magnus Karlsson <magnus.karlsson@...il.com>,
        "Karlsson, Magnus" <magnus.karlsson@...el.com>
Subject: Re: [Intel-wired-lan] [PATCH] i40e: replace switch-statement with if-clause

Den mån 21 jan. 2019 kl 20:12 skrev Jesper Dangaard Brouer <brouer@...hat.com>:
>
> On Mon, 21 Jan 2019 17:53:45 +0100
> Björn Töpel <bjorn.topel@...il.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
>

Nice! ...but does that help here? I mean, excluding the thunks in jump
table call generation isn't really an option?

Is it possible in a function scoped way to change, say, the
case-values-threshold?


Björn

> --
> Best regards,
>   Jesper Dangaard Brouer
>   MSc.CS, Principal Kernel Engineer at Red Hat
>   LinkedIn: http://www.linkedin.com/in/brouer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ