On Fri, Oct 16, 2020 at 2:00 PM Bruce Richardson
<bruce.richard...@intel.com> wrote:
>
> On Thu, Oct 15, 2020 at 05:28:10PM +0000, Jerin Jacob Kollanukkaran wrote:
> > > -----Original Message-----
> > > From: Thomas Monjalon <tho...@monjalon.net>
> > > Sent: Thursday, October 15, 2020 10:45 PM
> > > To: Ali Alnubani <alia...@nvidia.com>; Bruce Richardson
> > > <bruce.richard...@intel.com>
> > > Cc: dev@dpdk.org; Asaf Penso <as...@nvidia.com>;
> > > david.march...@redhat.com; arybche...@solarflare.com;
> > > ferruh.yi...@intel.com; honnappa.nagaraha...@arm.com; Jerin Jacob
> > > Kollanukkaran <jer...@marvell.com>
> > > Subject: [EXT] Re: performance degradation with fpic
> > >
> > > External Email
> > >
> > > ----------------------------------------------------------------------
> > > 15/10/2020 19:08, Bruce Richardson:
> > > > On Thu, Oct 15, 2020 at 04:00:44PM +0000, Ali Alnubani wrote:
> > > > >    We have been seeing in some cases that the DPDK forwarding
> > > performance
> > > > >    is up to 9% lower when DPDK is built as static with meson compared 
> > > > > to a
> > > > >    build with makefiles.
> > > > >
> > > > >    The same degradation can be reproduced with makefiles on older DPDK
> > > > >    releases when building with EXTAR_CFLAGS set to “-fPIC”, it can 
> > > > > also be
> > > > >    resolved in meson when passing “pic: false” to meson’s 
> > > > > static_library
> > > > >    call (more tweaking needs to be done to prevent building shared
> > > > >    libraries because this change breaks them).
> > > [...]
> > > > >    Should we disable PIC in static builds?
> > > >
> > > > thanks for reporting, though it's strange that you see such a big 
> > > > impact.
> > > > In my previous tests with i40e driver I never noticed a difference
> > > > between make and meson builds, and I and some others here have been
> > > > using meson builds for any performance work for over a year now. That
> > > > being said let me reverify what I see on my end.
> > > >
> > > > In terms of solutions, disabling the -fPIC flag globally implies that
> > > > we can no longer build static and shared libs from the same sources,
> > > > so we would need to revert to doing either a static or a shared
> > > > library build but not both. If the issue is limited to only some
> > > > drivers or some cases, we can perhaps add in a build option to have
> > > > no-fpic-static builds, to be used in a cases where it is problematic.
> >
> > We have seen this issue earlier. Our issue was, meson, getting more 
> > performance
> > Than make build system(Based on different changeset). Initially we 
> > suspected fpic
> > is playing role. Based on our understanding, It not is fpic issue per say, 
> > it is more
> > of text section  code alignment change was creating the issue.
> > Typically it happen with very "fine" grained, prefetches in Rx and Tx 
> > routines, then
> > All timing will get changed by radical change to text section by fpic.
> >
>
> Out of interest, what range of performance difference did you see, because
> the 9% reported is fairly massive, well beyond anything I would expect from
> such a change?

We have seen up to 4% difference in per core/mpps.

Reply via email to