[dpdk-dev] [PATCH 1/3] eal/x86: run-time dispatch over memcpy

Bruce Richardson bruce.richardson at intel.com
Wed Aug 30 19:51:41 CEST 2017


On Wed, Aug 30, 2017 at 03:56:35PM +0100, Ananyev, Konstantin wrote:
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Xiaoyun Li
> > Sent: Friday, August 25, 2017 3:06 AM
> > To: Richardson, Bruce <bruce.richardson at intel.com>
> > Cc: dev at dpdk.org; Lu, Wenzhuo <wenzhuo.lu at intel.com>; Wang, Zhihong <zhihong.wang at intel.com>; Zhang, Qi Z
> > <qi.z.zhang at intel.com>; Li, Xiaoyun <xiaoyun.li at intel.com>
> > 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


More information about the dev mailing list