DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: "Wang, Zhihong" <zhihong.wang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Thomas Monjalon <thomas.monjalon@6wind.com>
Subject: Re: [dpdk-dev] [PATCH] vhost: optimize vhost memcpy
Date: Mon, 5 Dec 2016 18:37:09 +0800	[thread overview]
Message-ID: <20161205103709.GL24403@yliu-dev.sh.intel.com> (raw)
In-Reply-To: <8F6C2BD409508844A0EFC19955BE09414E7FF22D@SHSMSX103.ccr.corp.intel.com>

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

  reply	other threads:[~2016-12-05 10:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02  1:19 Zhihong Wang
2016-12-02 10:30 ` Thomas Monjalon
2016-12-05  8:27 ` Yuanhan Liu
2016-12-05 10:27   ` Wang, Zhihong
2016-12-05 10:37     ` Yuanhan Liu [this message]
2016-12-07  6:11       ` Wang, Zhihong
2016-12-07  1:31 ` [dpdk-dev] [PATCH v2] eal: optimize aligned rte_memcpy Zhihong Wang
2016-12-08  0:55   ` Yao, Lei A
2016-12-08  2:18   ` Yuanhan Liu
2017-01-17 15:08     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161205103709.GL24403@yliu-dev.sh.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas.monjalon@6wind.com \
    --cc=zhihong.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).