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 B44952BAF for ; Wed, 30 Aug 2017 19:51:48 +0200 (CEST) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Aug 2017 10:51:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,449,1498546800"; d="scan'208";a="145748821" Received: from bricha3-mobl3.ger.corp.intel.com ([10.252.9.42]) by fmsmga005.fm.intel.com with SMTP; 30 Aug 2017 10:51:41 -0700 Received: by (sSMTP sendmail emulation); Wed, 30 Aug 2017 18:51:41 +0100 Date: Wed, 30 Aug 2017 18:51:41 +0100 From: Bruce Richardson To: "Ananyev, Konstantin" Cc: "Li, Xiaoyun" , "dev@dpdk.org" , "Lu, Wenzhuo" , "Wang, Zhihong" , "Zhang, Qi Z" Message-ID: <20170830175140.GA11692@bricha3-MOBL3.ger.corp.intel.com> References: <1503626773-184682-1-git-send-email-xiaoyun.li@intel.com> <1503626773-184682-2-git-send-email-xiaoyun.li@intel.com> <2601191342CEEE43887BDE71AB9772584F23E343@IRSMSX103.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2601191342CEEE43887BDE71AB9772584F23E343@IRSMSX103.ger.corp.intel.com> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.8.3 (2017-05-23) Subject: Re: [dpdk-dev] [PATCH 1/3] eal/x86: run-time dispatch over memcpy 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: Wed, 30 Aug 2017 17:51:49 -0000 On Wed, Aug 30, 2017 at 03:56:35PM +0100, Ananyev, Konstantin wrote: > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Xiaoyun Li > > Sent: Friday, August 25, 2017 3:06 AM > > To: Richardson, Bruce > > Cc: dev@dpdk.org; Lu, Wenzhuo ; Wang, Zhihong ; Zhang, Qi Z > > ; Li, Xiaoyun > > Subject: [dpdk-dev] [PATCH 1/3] eal/x86: run-time dispatch over memcpy > > > > This patch dynamically selects functions of memcpy at run-time based > > on CPU flags that current machine supports. This patch uses function > > pointers which are bind to the relative functions at constrctor time. > > To make AVX512 instructions pass compilation, enable the switch in > > makefile. > > It seems quite an overhead to add extra function call for each 16B movement... > Wouldn't it be better to have one func_ptr per implementation, i.e: > rte_memcpy_sse(), rte_memcpy_avx2(), rte_memcpy_avx512(), etc.? > Konstantin > +1 to this. Also, how big of a benefit is there for this implementation over standard libc memcpy (in a reasonably bleeding edge distro like e.g. Fedora 26)? /Bruce