DPDK usage discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Yuyong Zhang <yuyong.zhang@casa-systems.com>
Cc: "users@dpdk.org" <users@dpdk.org>
Subject: Re: [dpdk-users] compile warning in dpdk lib header files "error: inlining failed in call .... call is unlikely and code size would grow"
Date: Fri, 8 Sep 2017 14:51:50 -0700	[thread overview]
Message-ID: <20170908145150.1aad2b4e@xeon-e3> (raw)
In-Reply-To: <BN6PR06MB2756FD29E0EBC5A3EEE3A6E3B9950@BN6PR06MB2756.namprd06.prod.outlook.com>

On Fri, 8 Sep 2017 19:15:51 +0000
Yuyong Zhang <yuyong.zhang@casa-systems.com> wrote:

> Thanks Stephen for the quick response.
> 
> 
> 
> For performance considerations, which one is better:
> 
> 
> 
> 1.     Use –Wno-error=inline to turn off the warning which compiler will not do inline for the warned inline function
> 
> or
> 
> 2.     Modify dpdk header file to add __attribute__((always_inline)) to force complier to always do inline for these functions.
> 
> 
> 
> I assume option-2 is better for performance, any suggestions?
> 

The unlikely() branches are all error cases, there is no reason they should impact performance.
In fact excessive inline can cause code to grow and larger code causes more instruction cache misses.

Just use option 1.  You obviously already changed the compile flags because the default
DPDK make files have macro WERROR which does not enable this.

      reply	other threads:[~2017-09-08 21:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-08 18:45 Yuyong Zhang
2017-09-08 19:08 ` Stephen Hemminger
2017-09-08 19:15   ` Yuyong Zhang
2017-09-08 21:51     ` Stephen Hemminger [this message]

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=20170908145150.1aad2b4e@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=users@dpdk.org \
    --cc=yuyong.zhang@casa-systems.com \
    /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).