DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Bruce Richardson <bruce.richardson@intel.com>, bluca@debian.org
Cc: Ali Alnubani <alialnu@nvidia.com>,
	dev@dpdk.org, Asaf Penso <asafp@nvidia.com>,
	ferruh.yigit@intel.com, jerinj@marvell.com, akhil.goyal@nxp.com,
	andrew.rybchenko@oktetlabs.ru, ajit.khaparde@broadcom.com,
	konstantin.ananyev@intel.com, viacheslavo@nvidia.com
Subject: Re: [dpdk-dev] performance degradation with fpic
Date: Tue, 03 Nov 2020 11:18:57 +0100	[thread overview]
Message-ID: <7983217.MxgJTX9gS5@thomas> (raw)
In-Reply-To: <20201102150053.GC1454@bricha3-MOBL.ger.corp.intel.com>

02/11/2020 16:00, Bruce Richardson:
> On Mon, Nov 02, 2020 at 10:40:54AM +0000, Ali Alnubani wrote:
> > Hi Bruce,
> > 
> > I was able to pin this down on drivers/net/mlx5/mlx5_rxtx.c. Removing -fPIC from its ninja recipe in build.ninja resolves the issue (had to prevent creating shared libs in this case).
> > What do you suggest I do? Can we have per-pmd customized compilation flags?
> > 
> > Regards,
> > Ali
> > 
> There are multiple possible ways to achieve this, but below are some ideas:
> 
> 1. Take the changes for supporting function versioning and duplicate them
> from lib/meson.build to drivers/meson.build. Since function versioning
> support already requires everything to be built twice, we could set it to
> not use -fpic for the static libs in that case. Then mark mlx5 as using
> function versioning. This is a bit hackish though, so
> 
> 2. The "objs" parameter from each sub-directory is not widely used, so we
> could split this easily enough into objs-shared and objs-static, and allow
> the subdirectory build file, in this case mlx5/meson.ninja, to build any c
> files manually to pass them back. This is more flexible, and also means
> that you can limit the files which are to be built twice to only the single
> file, rather than marking the whole driver as needing rebuild.

Can it be done only in the driver?
No general meson change for this option?

> I'm sure there are other approaches too. However, I agree with Luca's
> comment that first approach should probably be to see if you can track down
> exactly why this one file is having problems. Could any of the slowdown be
> due to the fact that you use a common lib from your driver? Are there
> cross-driver calls in the fast-path that are suffering a penalty?

Of course the performance will be analyzed in the long run.
However, such analyzis is more convenient if meson is flexible enough
to allow customization of the build.
And in general, I think it is good to have meson flexible
to allow any kind of driver build customization.



  reply	other threads:[~2020-11-03 10:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 16:00 Ali Alnubani
2020-10-15 17:08 ` Bruce Richardson
2020-10-15 17:14   ` Thomas Monjalon
2020-10-15 17:28     ` [dpdk-dev] [EXT] " Jerin Jacob Kollanukkaran
2020-10-16  8:29       ` Bruce Richardson
2020-10-16  8:39         ` Jerin Jacob
2020-10-15 21:44     ` [dpdk-dev] " Stephen Hemminger
2020-10-16  8:35       ` Bruce Richardson
2020-10-16  9:59   ` Bruce Richardson
2020-10-19 11:47     ` Ali Alnubani
2020-10-19 13:01       ` Bruce Richardson
2020-10-22 13:17         ` Ali Alnubani
2020-10-22 13:57           ` Bruce Richardson
2020-10-22 14:16             ` Ali Alnubani
2020-11-02 10:40               ` Ali Alnubani
2020-11-02 11:01                 ` Luca Boccassi
2020-11-02 15:00                 ` Bruce Richardson
2020-11-03 10:18                   ` Thomas Monjalon [this message]
2020-11-03 10:45                     ` Luca Boccassi
2020-11-03 11:23                     ` Bruce Richardson

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=7983217.MxgJTX9gS5@thomas \
    --to=thomas@monjalon.net \
    --cc=ajit.khaparde@broadcom.com \
    --cc=akhil.goyal@nxp.com \
    --cc=alialnu@nvidia.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=asafp@nvidia.com \
    --cc=bluca@debian.org \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=jerinj@marvell.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=viacheslavo@nvidia.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).