DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Ali Alnubani <alialnu@nvidia.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	NBU-Contact-Thomas Monjalon <thomas@monjalon.net>,
	Asaf Penso <asafp@nvidia.com>
Subject: Re: [dpdk-dev] performance degradation with fpic
Date: Mon, 2 Nov 2020 15:00:53 +0000	[thread overview]
Message-ID: <20201102150053.GC1454@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <DM6PR12MB4618B5D9D93473E1488D11F8DA100@DM6PR12MB4618.namprd12.prod.outlook.com>

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.

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?

/Bruce

  parent reply	other threads:[~2020-11-02 15:01 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 [this message]
2020-11-03 10:18                   ` Thomas Monjalon
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=20201102150053.GC1454@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=alialnu@nvidia.com \
    --cc=asafp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /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).