[dpdk-dev] [PATCH] vhost: optimize vhost memcpy
Yuanhan Liu
yuanhan.liu at linux.intel.com
Mon Dec 5 11:37:09 CET 2016
On Mon, Dec 05, 2016 at 10:27:00AM +0000, Wang, Zhihong wrote:
> > 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?
Yes, but this one is not supposed to be exported as a public API.
It should be called inside rte_memcpy (when data is well aligned).
In this way, only rte_memcpy is exposed, and nothing else should
be changed.
--yliu
>
> 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