DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
* [dpdk-dev] DPDK and Link-time Optimizations
@ 2019-04-29 16:39 Mattias Rönnblom
  2019-04-29 16:50 ` Stephen Hemminger
  2019-11-08 14:31 ` Thomas Monjalon
  0 siblings, 2 replies; 3+ messages in thread
From: Mattias Rönnblom @ 2019-04-29 16:39 UTC (permalink / raw)
  To: dev

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] DPDK and Link-time Optimizations
  2019-04-29 16:39 [dpdk-dev] DPDK and Link-time Optimizations Mattias Rönnblom
@ 2019-04-29 16:50 ` Stephen Hemminger
  2019-11-08 14:31 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2019-04-29 16:50 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dev

On Mon, 29 Apr 2019 18:39:47 +0200
Mattias Rönnblom <mattias.ronnblom@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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] DPDK and Link-time Optimizations
  2019-04-29 16:39 [dpdk-dev] DPDK and Link-time Optimizations Mattias Rönnblom
  2019-04-29 16:50 ` Stephen Hemminger
@ 2019-11-08 14:31 ` Thomas Monjalon
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2019-11-08 14:31 UTC (permalink / raw)
  To: Mattias Rönnblom; +Cc: dev

29/04/2019 18:39, Mattias Rönnblom:
> 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.

That's an interesting point of view.

For info, LTO is merged now.

I would like to see some benchmarks about
LTO static vs shared vs shared without inlines.
Then we could decide what to do with inline functions.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-29 16:39 [dpdk-dev] DPDK and Link-time Optimizations Mattias Rönnblom
2019-04-29 16:50 ` Stephen Hemminger
2019-11-08 14:31 ` Thomas Monjalon

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org
	public-inbox-index dpdk-dev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git