From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 0F8792C0A for ; Fri, 2 Dec 2016 09:35:57 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga103.jf.intel.com with ESMTP; 02 Dec 2016 00:35:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,285,1477983600"; d="scan'208";a="1093575500" Received: from dpdk5.bj.intel.com ([172.16.182.188]) by fmsmga002.fm.intel.com with ESMTP; 02 Dec 2016 00:35:56 -0800 From: Zhiyong Yang To: dev@dpdk.org Cc: yuanhan.liu@linux.intel.com, bruce.richardson@intel.com, konstantin.ananyev@intel.com Date: Mon, 5 Dec 2016 16:26:23 +0800 Message-Id: <1480926387-63838-1-git-send-email-zhiyong.yang@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH 0/4] eal/common: introduce rte_memset and related test 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: , X-List-Received-Date: Fri, 02 Dec 2016 08:35:58 -0000 DPDK code has met performance drop badly in some case when calling glibc function memset. Reference to discussions about memset in http://dpdk.org/ml/archives/dev/2016-October/048628.html It is necessary to introduce more high efficient function to fix it. One important thing about rte_memset is that we can get clear control on what instruction flow is used. This patchset introduces rte_memset to bring more high efficient implementation, and will bring obvious perf improvement, especially for small N bytes in the most application scenarios. Patch 1 implements rte_memset in the file rte_memset.h on IA platform The file supports three types of instruction sets including sse & avx (128bits), avx2(256bits) and avx512(512bits). rte_memset makes use of vectorization and inline function to improve the perf on IA. In addition, cache line and memory alignment are fully taken into consideration. Patch 2 implements functional autotest to validates the function whether to work in a right way. Patch 3 implements performance autotest separately in cache and memory. Patch 4 Using rte_memset instead of copy_virtio_net_hdr can bring 3%~4% performance improvements on IA platform from virtio/vhost non-mergeable loopback testing. Zhiyong Yang (4): eal/common: introduce rte_memset on IA platform app/test: add functional autotest for rte_memset app/test: add performance autotest for rte_memset lib/librte_vhost: improve vhost perf using rte_memset app/test/Makefile | 3 + app/test/test_memset.c | 158 +++++++++ app/test/test_memset_perf.c | 348 +++++++++++++++++++ doc/guides/rel_notes/release_17_02.rst | 11 + .../common/include/arch/x86/rte_memset.h | 376 +++++++++++++++++++++ lib/librte_eal/common/include/generic/rte_memset.h | 51 +++ lib/librte_vhost/virtio_net.c | 18 +- 7 files changed, 958 insertions(+), 7 deletions(-) create mode 100644 app/test/test_memset.c create mode 100644 app/test/test_memset_perf.c create mode 100644 lib/librte_eal/common/include/arch/x86/rte_memset.h create mode 100644 lib/librte_eal/common/include/generic/rte_memset.h -- 2.7.4