[dpdk-dev] [PATCH v3 1/3] lib/lpm: not inline unnecessary functions
Ruifeng Wang (Arm Technology China)
Ruifeng.Wang at arm.com
Fri Jun 28 04:44:54 CEST 2019
> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Thursday, June 27, 2019 23:25
> To: Ruifeng Wang (Arm Technology China) <Ruifeng.Wang at arm.com>
> Cc: bruce.richardson at intel.com; vladimir.medvedkin at intel.com;
> dev at dpdk.org; Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>;
> Gavin Hu (Arm Technology China) <Gavin.Hu at arm.com>; nd <nd at arm.com>
> Subject: Re: [dpdk-dev] [PATCH v3 1/3] lib/lpm: not inline unnecessary
> On Thu, 27 Jun 2019 17:37:49 +0800
> Ruifeng Wang <ruifeng.wang at arm.com> wrote:
> > Tests showed that the function inlining caused performance drop on
> > some x86 platforms with the memory ordering patches applied.
> > By force no-inline functions, the performance was better than before
> > on x86 and no impact to arm64 platforms.
> > Suggested-by: Medvedkin Vladimir <vladimir.medvedkin at intel.com>
> > Signed-off-by: Ruifeng Wang <ruifeng.wang at arm.com>
> > Reviewed-by: Gavin Hu <gavin.hu at arm.com>
> Do you actually need to force noinline or is just taking of inline enough?
> In general, letting compiler decide is often best practice.
The force noinline is an optimization for x86 platforms to keep rte_lpm_add() API
performance with memory ordering applied.
More information about the dev