[dpdk-dev] DPDK and Link-time Optimizations

Stephen Hemminger stephen at networkplumber.org
Mon Apr 29 18:50:42 CEST 2019


On Mon, 29 Apr 2019 18:39:47 +0200
Mattias Rönnblom <mattias.ronnblom at ericsson.com> wrote:

> Hi.
> 
> Did anyone on the list successfully build DPDK with GCC Link-time 
> Optimizations (LTO) enabled? I tried and failed a while back, although 
> the detailed reasons of my failure eludes me for the moment.
> 
> If LTO builds would work "out of the box", DPDK could gradually migrate 
> from away from having static inline functions in the header files.
> 
> Those interested squeezing out as much performance as possible would 
> build with LTO (and static linking), and those applications who cared 
> more about independent upgrades would use dynamic linking and non-LTO 
> builds. With the extra cost of using DPDK as a shared library 
> (-fPIC-compiled code, more expensive TLS accesses etc), I'm guessing 
> this is the case already today.
> 
> Regards,
> 	Mattias

I tried (and it worked) in the past. But you have to be consistent
about always using the same flags.  LTO also really makes compiler
a pig and you need multiple Gig of memory.


More information about the dev mailing list