[dpdk-dev] [PATCH] vhost: optimize vhost memcpy

Wang, Zhihong zhihong.wang at intel.com
Mon Dec 5 11:27:00 CET 2016


> I like this function a lot, since it's really simple and straightforward!
> Moreover, it performs better.
> 
> But, I don't quite like how this function is proposed:
> 
> - rte_movX are more like internal help functions that should be used only
>   in corresponding rte_memcpy.h file.
> 
> - It's a good optimization, however, it will not benefit for other use
>   cases, though vhost is the most typical case here.
> 
> - The optimization proves to be good for X86, but think there is no
>   guarantee it may behave well for other platforms, say ARM.
> 
> I still would suggest you to go this way: move this function into x86's
> rte_memcpy.h and call it when the data is well aligned.


Do you mean to add something like rte_memcpy_aligned() in 
lib/librte_eal/common/include/generic/rte_memcpy.h?

I thought of this way before, and didn't choose it because it requires
changes in eal. But it would be a clean solution, I'd certainly like
to implement it this way if people are okay with it.


Thanks
Zhihong


> 
> 	--yliu


More information about the dev mailing list