From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Wang, Zhihong" Subject: Re: [PATCH v2 0/5] Optimize memcpy for AVX512 platforms Date: Tue, 19 Jan 2016 02:37:46 +0000 Message-ID: <8F6C2BD409508844A0EFC19955BE0941033A8CF5@SHSMSX103.ccr.corp.intel.com> References: <1452752002-107586-1-git-send-email-zhihong.wang@intel.com> <1453086314-30158-1-git-send-email-zhihong.wang@intel.com> <20160118120629.5ed7bcd9@xeon-e3> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Stephen Hemminger Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 76E6F8E68 for ; Tue, 19 Jan 2016 03:37:50 +0100 (CET) In-Reply-To: <20160118120629.5ed7bcd9@xeon-e3> Content-Language: en-US List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Tuesday, January 19, 2016 4:06 AM > To: Wang, Zhihong > Cc: dev@dpdk.org; Ananyev, Konstantin ; > Richardson, Bruce ; Xie, Huawei > > Subject: Re: [PATCH v2 0/5] Optimize memcpy for AVX512 platforms >=20 > On Sun, 17 Jan 2016 22:05:09 -0500 > Zhihong Wang wrote: >=20 > > This patch set optimizes DPDK memcpy for AVX512 platforms, to make full > > utilization of hardware resources and deliver high performance. > > > > In current DPDK, memcpy holds a large proportion of execution time in > > libs like Vhost, especially for large packets, and this patch can bring > > considerable benefits. > > > > The implementation is based on the current DPDK memcpy framework, some > > background introduction can be found in these threads: > > http://dpdk.org/ml/archives/dev/2014-November/008158.html > > http://dpdk.org/ml/archives/dev/2015-January/011800.html > > > > Code changes are: > > > > 1. Read CPUID to check if AVX512 is supported by CPU > > > > 2. Predefine AVX512 macro if AVX512 is enabled by compiler > > > > 3. Implement AVX512 memcpy and choose the right implementation based > on > > predefined macros > > > > 4. Decide alignment unit for memcpy perf test based on predefined mac= ros >=20 > Cool, I like it. How much impact does this have on VHOST? The impact is significant especially for enqueue (Detailed numbers might no= t be appropriate here due to policy :-), only how I test it), because VHOST a= ctually spends a lot of time doing memcpy. Simply measure 1024B RX/TX time cost and compare it with 64B's and you'll get a sense of it, although not precise. My test cases include NIC2VM2NIC and VM2VM scenarios, which are the main use cases currently, and use both throughput and RX/TX cycles for evaluatio= n.