Message ID | 20200706074930.54299-1-joyce.kong@arm.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B6937A00C5; Mon, 6 Jul 2020 09:49:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0105C1C0B2; Mon, 6 Jul 2020 09:49:47 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id E68131BFE5 for <dev@dpdk.org>; Mon, 6 Jul 2020 09:49:45 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4A1D530E; Mon, 6 Jul 2020 00:49:45 -0700 (PDT) Received: from net-arm-thunderx2-03.shanghai.arm.com (net-arm-thunderx2-03.shanghai.arm.com [10.169.41.185]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id D5DD93F71E; Mon, 6 Jul 2020 00:49:40 -0700 (PDT) From: Joyce Kong <joyce.kong@arm.com> To: maxime.coquelin@redhat.com, jerinj@marvell.com, zhihong.wang@intel.com, xiaolong.ye@intel.com, beilei.xing@intel.com, jia.guo@intel.com, john.mcnamara@intel.com, matan@mellanox.com, shahafs@mellanox.com, viacheslavo@mellanox.com, honnappa.nagarahalli@arm.com, phil.yang@arm.com, ruifeng.wang@arm.com Cc: dev@dpdk.org, nd@arm.com Date: Mon, 6 Jul 2020 15:49:24 +0800 Message-Id: <20200706074930.54299-1-joyce.kong@arm.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200611033248.39049-1-joyce.kong@arm.com> References: <20200611033248.39049-1-joyce.kong@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 0/6] Restrict pointer aliasing with a common wrapper X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Series |
Restrict pointer aliasing with a common wrapper
|
|
Message
Joyce Kong
July 6, 2020, 7:49 a.m. UTC
As the 'restrict' keyword is recognized in C99, this patchset is to add a wrapper defining '__rte_restrict' which can be supported by all compilers. Then replace the existing 'restrict' and '__restrict' in different vpmds, and optimize vhost/virtio with restricted pointer aliasing for more aggressive loops vectorization. The vhost/virtio optimization patches were benchmarked by running PVP case on ThunderX2 platform and showed positive performance results. Joyce Kong (6): lib/eal: add a wrapper to define restricted pointers net/virtio: restrict pointer aliasing for NEON vpmd lib/vhost: restrict pointer aliasing for packed vpmd net/i40e: replace restrict with rte restrict examples/performance-thread: replace restrict with wrapper net/mlx5: replace restrict keyword with rte restrict drivers/net/i40e/i40e_rxtx_vec_neon.c | 17 +- drivers/net/mlx5/mlx5_rxtx.c | 208 +++++++++--------- drivers/net/virtio/virtio_rxtx_simple_neon.c | 5 +- .../pthread_shim/pthread_shim.c | 12 +- lib/librte_eal/include/rte_common.h | 10 + lib/librte_vhost/virtio_net.c | 14 +- 6 files changed, 139 insertions(+), 127 deletions(-)
Comments
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Joyce Kong > Sent: Monday, July 6, 2020 9:49 AM > > As the 'restrict' keyword is recognized in C99, this patchset is to > add a wrapper defining '__rte_restrict' which can be supported by > all compilers. Then replace the existing 'restrict' and '__restrict' > in different vpmds, and optimize vhost/virtio with restricted pointer > aliasing for more aggressive loops vectorization. > > The vhost/virtio optimization patches were benchmarked by running PVP > case on ThunderX2 platform and showed positive performance results. > > Joyce Kong (6): > lib/eal: add a wrapper to define restricted pointers > net/virtio: restrict pointer aliasing for NEON vpmd > lib/vhost: restrict pointer aliasing for packed vpmd > net/i40e: replace restrict with rte restrict > examples/performance-thread: replace restrict with wrapper > net/mlx5: replace restrict keyword with rte restrict > > drivers/net/i40e/i40e_rxtx_vec_neon.c | 17 +- > drivers/net/mlx5/mlx5_rxtx.c | 208 +++++++++--------- > drivers/net/virtio/virtio_rxtx_simple_neon.c | 5 +- > .../pthread_shim/pthread_shim.c | 12 +- > lib/librte_eal/include/rte_common.h | 10 + > lib/librte_vhost/virtio_net.c | 14 +- > 6 files changed, 139 insertions(+), 127 deletions(-) > > -- > 2.27.0 > If you are hunting for more places to add __rte_restrict, I will suggest rte_memcpy.h.
> -----Original Message----- > From: Morten Brørup <mb@smartsharesystems.com> > Sent: Thursday, July 9, 2020 9:53 PM > To: Joyce Kong <Joyce.Kong@arm.com>; maxime.coquelin@redhat.com; > jerinj@marvell.com; zhihong.wang@intel.com; xiaolong.ye@intel.com; > beilei.xing@intel.com; jia.guo@intel.com; john.mcnamara@intel.com; > matan@mellanox.com; shahafs@mellanox.com; viacheslavo@mellanox.com; > Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>; Phil Yang > <Phil.Yang@arm.com>; Ruifeng Wang <Ruifeng.Wang@arm.com> > Cc: dev@dpdk.org; nd <nd@arm.com> > Subject: RE: [dpdk-dev] [PATCH v2 0/6] Restrict pointer aliasing with a > commonwrapper > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Joyce Kong > > Sent: Monday, July 6, 2020 9:49 AM > > > > As the 'restrict' keyword is recognized in C99, this patchset is to > > add a wrapper defining '__rte_restrict' which can be supported by all > > compilers. Then replace the existing 'restrict' and '__restrict' > > in different vpmds, and optimize vhost/virtio with restricted pointer > > aliasing for more aggressive loops vectorization. > > > > The vhost/virtio optimization patches were benchmarked by running PVP > > case on ThunderX2 platform and showed positive performance results. > > > > Joyce Kong (6): > > lib/eal: add a wrapper to define restricted pointers > > net/virtio: restrict pointer aliasing for NEON vpmd > > lib/vhost: restrict pointer aliasing for packed vpmd > > net/i40e: replace restrict with rte restrict > > examples/performance-thread: replace restrict with wrapper > > net/mlx5: replace restrict keyword with rte restrict > > > > drivers/net/i40e/i40e_rxtx_vec_neon.c | 17 +- > > drivers/net/mlx5/mlx5_rxtx.c | 208 +++++++++--------- > > drivers/net/virtio/virtio_rxtx_simple_neon.c | 5 +- > > .../pthread_shim/pthread_shim.c | 12 +- > > lib/librte_eal/include/rte_common.h | 10 + > > lib/librte_vhost/virtio_net.c | 14 +- > > 6 files changed, 139 insertions(+), 127 deletions(-) > > > > -- > > 2.27.0 > > > > If you are hunting for more places to add __rte_restrict, I will suggest > rte_memcpy.h. > I will try to do this after the common patch is ok. Thanks.