From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B028EA04DB; Thu, 15 Oct 2020 19:15:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 055911DCE5; Thu, 15 Oct 2020 19:15:00 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id E11901DCC2 for ; Thu, 15 Oct 2020 19:14:58 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id DA4185C01C7; Thu, 15 Oct 2020 13:14:54 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Thu, 15 Oct 2020 13:14:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= fFAbXX5elpW8hRg1d0CbbYJ9xeZWmxpcCvlwdwdiZQA=; b=b4nyt0xVtodVVS4x tskWYfy2md358AJTS5d4EaBXreVzgZLt4z2NJbpmDBLu7frVwGxI3MMW8Q6RVhx7 b428fty0Yk8lrbj1adL6zQcfvr6kBkZqm3IR2apAJjsAmNQBT6Wm85t08mPJuO/k jUfJjCYbipgoAN568GxAH8ZCaAJefOF254KEmMUztQYZ3eWmiowoQd0tsj+8ilNj Mp0G09TYs+mrg1WmxwZi4+gEHjPz9Awh1u1Jv0upT8h9XtSAhrfGWKcGlgaKZqsw MWkqRaglRJzUsSFEO0+6xk9SljaJissZ9gywcOAkaVCZ5wvl5K/eOHI7j5Q1wdCV UkU8OQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=fFAbXX5elpW8hRg1d0CbbYJ9xeZWmxpcCvlwdwdiZ QA=; b=cA8htM5Xwxx4eTkPHLyJS0wnK8uqed7Xwmm3B0HXMoEXh7AkoxeApdVwY tuWpP4fqsrGbnKLTJcItakPxvnZD3SGB+MNPJzL8boJDVGVT7NQJ1VfsHUoATYcB vkm/eJUb58t5/uJ7EYQ1fJMQWLQ+RuW8ouWQeo/nDkm1rmaJa/x73Xw6waADvvka /UayUPEb4nxIP0Pucm/5a3Pw+ePvbL/uicfH/URPBDdJPyJbJCz8r+FAHQrrBcjN 5/DYLast41FtexTfSBuv6X30ckKXJxCecNsKr6Q/0gOtAe7PRvTK1XKCRo5OkJji 2CLRvvPH5pxGEN726PKNUQP4rRNtg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrieefgddutdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepkeethedtieevhfeigeejleegudefjeehkeekteeuveeiuedvveeu tdejveehveetnecukfhppeejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghl ohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id CD6B8328005D; Thu, 15 Oct 2020 13:14:52 -0400 (EDT) From: Thomas Monjalon To: Ali Alnubani , Bruce Richardson Cc: "dev@dpdk.org" , Asaf Penso , david.marchand@redhat.com, arybchenko@solarflare.com, ferruh.yigit@intel.com, honnappa.nagarahalli@arm.com, jerinj@marvell.com Date: Thu, 15 Oct 2020 19:14:48 +0200 Message-ID: <2573869.E7my6rS1tG@thomas> In-Reply-To: <20201015170804.GG554@bricha3-MOBL.ger.corp.intel.com> References: <20201015170804.GG554@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] performance degradation with fpic X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 performan= ce > > is up to 9% lower when DPDK is built as static with meson compared t= o a > > build with makefiles. > >=20 > > The same degradation can be reproduced with makefiles on older DPDK > > releases when building with EXTAR_CFLAGS set to =E2=80=9C-fPIC=E2=80= =9D, it can also be > > resolved in meson when passing =E2=80=9Cpic: false=E2=80=9D to meson= =E2=80=99s 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? >=20 > 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. >=20 > 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. I assume only some Rx/Tx functions are impacted. We probably need such disabling option per-file. > However, at this point, I think we need a little more investigation. Is > there any testing you can do to see if it's just in your driver, or in > perhaps a mempool driver/lib that the issue appears, or if it's just a > global slowdown? Do you see the impact with both clang and gcc? I'll > retest things a bit tomorrow on my end to see what I see. Yes we need to know which libs or files are impacted by -fPIC.