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 14CF6A04DB; Fri, 16 Oct 2020 10:39:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 603061EB5F; Fri, 16 Oct 2020 10:39:56 +0200 (CEST) Received: from mail-il1-f193.google.com (mail-il1-f193.google.com [209.85.166.193]) by dpdk.org (Postfix) with ESMTP id D0F4E1EB5E for ; Fri, 16 Oct 2020 10:39:54 +0200 (CEST) Received: by mail-il1-f193.google.com with SMTP id z2so1683512ilh.11 for ; Fri, 16 Oct 2020 01:39:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=7WKEMulMsC0uHlNXD1lAmUjfiqURAOXK+TiAo+ecgnE=; b=I/HEuSlYWMv3bpfaPNPK1nbpoBFIfrlb2j5yzSoA8qJWBYa1Gb+jOg0vhj8Q4BvvWo 73DnuDXk6lU37b/JG/uv4liYoPKmYyil6GcVS0lO/vFjzvxqWlNmumY8jo+XkT9UGt/p 2aGWT2IVaPh+0c+i9Qga+JuDU5ZkAW9Nz+PWnLeD9tQXvH+p5zCjReLipyQacZDyixH0 p5BYKXwHIbMdvqTMS99C7DaRCm1kO506ENdlikNgKEd8jvYSUHxwn1kB0gtEaIzSOLJL 76AJqwkdMnnsc3nQhpFOJxRhl9fNCehktDflVnD7SfJSP2G0TPFKLVtSgyODZGCE09Zl pg5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=7WKEMulMsC0uHlNXD1lAmUjfiqURAOXK+TiAo+ecgnE=; b=C2RfPdMaQfLSOxOkXZW74TdSLA2RBVyF7aqQtZu4GQZeVeDyYeVUlf0JpersqEtObz F4bcFB4BMLefuJKrTxoRV/lMVceMG4X9Q9VDHEHWDBC1Mb8BoZoJ7JQlXUJODZCZ8fOa h4eP48jtXzNWx5nU/i/6Hc8F+heJyq383xBeTCk2IY0P4/adyLeHjHjg+ZnWjVLkwAyZ T6CPfHIOMKAg04SMsT4gUKk61gdO/sMyRPWzQaxN2oYj7s1mhSw4ZqjclopZP/FHJt7G 2YayBPkraDMui5o3USLuOuxdPEp6FkzGMV4xNe4jRSnZQgQWLY02kSoIhw/tWoQqZ5IS VHdg== X-Gm-Message-State: AOAM530WgO0wCL7gLA1WY8endwUaXnKw8q/SV4OrGfPWJeKK0mT2Y25u UB976NvSX/7ECjyDohIpk0VTXtPvjzKOX/hKlGQ= X-Google-Smtp-Source: ABdhPJxKJtVLJJHCsgHfTJ26vU9lhlHURIQ/hFfQIOdrxc9igxt+q3OBr7OymCnAcU5B5nOnSXC+yAPebKOgbPwnPV8= X-Received: by 2002:a92:840b:: with SMTP id l11mr1771908ild.60.1602837593154; Fri, 16 Oct 2020 01:39:53 -0700 (PDT) MIME-Version: 1.0 References: <20201015170804.GG554@bricha3-MOBL.ger.corp.intel.com> <2573869.E7my6rS1tG@thomas> <20201016082951.GA1008@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20201016082951.GA1008@bricha3-MOBL.ger.corp.intel.com> From: Jerin Jacob Date: Fri, 16 Oct 2020 14:09:37 +0530 Message-ID: To: Bruce Richardson Cc: Jerin Jacob Kollanukkaran , Thomas Monjalon , Ali Alnubani , "dev@dpdk.org" , Asaf Penso , "david.marchand@redhat.com" , "arybchenko@solarflare.com" , "ferruh.yigit@intel.com" , "honnappa.nagarahalli@arm.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [EXT] Re: 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" On Fri, Oct 16, 2020 at 2:00 PM Bruce Richardson wrote: > > On Thu, Oct 15, 2020 at 05:28:10PM +0000, Jerin Jacob Kollanukkaran wrote= : > > > -----Original Message----- > > > From: Thomas Monjalon > > > Sent: Thursday, October 15, 2020 10:45 PM > > > 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; Jerin Jacob > > > Kollanukkaran > > > 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 comp= ared to a > > > > > build with makefiles. > > > > > > > > > > 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 share= d > > > > > 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 i= mpact. > > > > 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. Th= at > > > > being said let me reverify what I see on my end. > > > > > > > > In terms of solutions, disabling the -fPIC flag globally implies th= at > > > > 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 problemati= c. > > > > We have seen this issue earlier. Our issue was, meson, getting more per= formance > > Than make build system(Based on different changeset). Initially we susp= ected fpic > > is playing role. Based on our understanding, It not is fpic issue per s= ay, 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 r= outines, 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, becaus= e > the 9% reported is fairly massive, well beyond anything I would expect fr= om > such a change? We have seen up to 4% difference in per core/mpps.