Message ID | 20200710023850.43898-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 651A9A0526; Fri, 10 Jul 2020 04:41:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 724F41DCCF; Fri, 10 Jul 2020 04:41:53 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 947D91DA9A for <dev@dpdk.org>; Fri, 10 Jul 2020 04:41:51 +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 E28EF31B; Thu, 9 Jul 2020 19:41:50 -0700 (PDT) Received: from net-arm-thunderx2-03.shanghai.arm.com (net-arm-thunderx2-03.shanghai.arm.com [10.169.208.204]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id F26BB3F9AB; Thu, 9 Jul 2020 19:41:45 -0700 (PDT) From: Joyce Kong <joyce.kong@arm.com> To: maxime.coquelin@redhat.com, jerinj@marvell.com, zhihong.wang@intel.com, amorenoz@redhat.com, mb@smartsharesystems.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: Fri, 10 Jul 2020 10:38:47 +0800 Message-Id: <20200710023850.43898-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 v3 0/3] 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 10, 2020, 2:38 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. v3: 1.Correct the compiling issue on GCC 4.8.5. 2.Squash the replacement patches and wrapper definition into one patch.(suggested by David Marchand) v2: Add a common wrapper for restricted pointer aliasing to be supported by all compilers.(suggested by Maxime Coquelin) Joyce Kong (3): lib/eal: add a common wrapper for restricted pointers net/virtio: restrict pointer aliasing for NEON vpmd lib/vhost: restrict pointer aliasing for packed vpmd 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
On Fri, Jul 10, 2020 at 4:42 AM Joyce Kong <joyce.kong@arm.com> wrote: > > 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. > > v3: > 1.Correct the compiling issue on GCC 4.8.5. > 2.Squash the replacement patches and wrapper definition into one > patch.(suggested by David Marchand) > > v2: > Add a common wrapper for restricted pointer aliasing to be supported > by all compilers.(suggested by Maxime Coquelin) > > Joyce Kong (3): > lib/eal: add a common wrapper for restricted pointers > net/virtio: restrict pointer aliasing for NEON vpmd > lib/vhost: restrict pointer aliasing for packed vpmd > > 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(-) > The changes are quite mechanical for the existing drivers. On the vhost/virtio side, Maxime is off but Adrian had a look at the generic bits. The gains in vhost/virtio patches are interesting. So I went and took those patches through the main branch. Series applied, thanks Joyce.