From: Herbert Guan <Herbert.Guan@arm.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
"jerin.jacob@caviumnetworks.com" <jerin.jacob@caviumnetworks.com>,
nd <nd@arm.com>
Subject: [dpdk-dev] 答复: [PATCH v5] arch/arm: optimization for memcpy on AArch64
Date: Fri, 19 Jan 2018 06:16:40 +0000 [thread overview]
Message-ID: <HE1PR08MB2809B7F0C0031F0E0CDCA7BA86EF0@HE1PR08MB2809.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <1629453.H12Nu1u4Xd@xps>
Yes, this is the target. I was in a 3-day meeting this week, and had limited time to update the patch.
A new patch v6 was sent out just now. It's actually sent twice -- forgot to add version info and "--in-reply-to" in the first one. Please just ignore that and I'm sorry for the disturbance.
Best regards,
Herbert
-----邮件原件-----
发件人: Thomas Monjalon [mailto:thomas@monjalon.net]
发送时间: 2018年1月19日 7:54
收件人: Herbert Guan <Herbert.Guan@arm.com>
抄送: dev@dpdk.org; jerin.jacob@caviumnetworks.com; nd <nd@arm.com>
主题: Re: [dpdk-dev] [PATCH v5] arch/arm: optimization for memcpy on AArch64
Ping
Are we targetting to integrate this optimization in DPDK 18.02?
I am expecting a v6, thanks.
15/01/2018 12:37, Thomas Monjalon:
> 15/01/2018 11:57, Herbert Guan:
> > Hi Thomas,
> >
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > Hi,
> > >
> > > All the code is using ARM64, but the title suggests AArch64.
> > > What is the difference between AArch64 and ARM64 (and ARMv8)?
> >
> > AArch64 and ARM64 refer to the same thing. AArch64 refers to the 64-bit architecture introduced since ARMv8-A. But the Linux kernel community calls it as ARM64. As to DPDK, in most existing compile flags, ARM64 is used. So this patch keeps the ARM64 naming in newly added compile options.
>
> So please let's continue to call it ARM64.
>
> > > 04/01/2018 11:20, Herbert Guan:
> > > > +#define RTE_ARM64_MEMCPY_IS_UNALIGNED_COPY(dst, src) \
> > > > + ((uintptr_t)(dst) & RTE_ARM64_MEMCPY_ALIGN_MASK) #else
> > > > +/* Both dst and src unalignment will be treated as unaligned
> > > > +copy */ #define RTE_ARM64_MEMCPY_IS_UNALIGNED_COPY(dst, src) \
> > > > + (((uintptr_t)(dst) | (uintptr_t)(src)) &
> > > > +RTE_ARM64_MEMCPY_ALIGN_MASK) #endif
> > > > +
> > > > +
> > > > +/*
> > > > + * If copy size is larger than threshold, memcpy() will be used.
> > > > + * Run "memcpy_perf_autotest" to determine the proper threshold.
> > > > + */
> > > > +#define RTE_ARM64_MEMCPY_ALIGNED_THRESHOLD
> > > ((size_t)(0xffffffff))
> > > > +#define RTE_ARM64_MEMCPY_UNALIGNED_THRESHOLD
> > > ((size_t)(0xffffffff))
> > > > +
> > > > +/*
> > > > + * The logic of USE_RTE_MEMCPY() can also be modified to best
> > > > +fit
> > > platform.
> > > > + */
> > > > +#define USE_RTE_MEMCPY(dst, src, n) \
> > > > +((!RTE_ARM64_MEMCPY_IS_UNALIGNED_COPY(dst, src) && \ n <=
> > > > +RTE_ARM64_MEMCPY_ALIGNED_THRESHOLD) \
> > > > +|| (RTE_ARM64_MEMCPY_IS_UNALIGNED_COPY(dst, src) && \
> > > > +n <= RTE_ARM64_MEMCPY_UNALIGNED_THRESHOLD))
> > > > +
> > > > +/**************************************
> > > > + * End of customization section
> > > > +**************************************/
> > >
> > > Modifying the code to asjust the platform is not easy for deployment.
> > > Can we move some customization variables inside the configuration file?
> >
> > RTE_ARM64_MEMCPY_ALIGNED_THRESHOLD and RTE_ARM64_MEMCPY_UNALIGNED_THRESHOLD are the 2 parameters can be configured during build-time. The values can be specified with the best values for the target platform. Usually it's not necessary to change the expression, the comment added in the code is just to raise the hint that this code piece can be modified.
>
> The build time configuration must be set in the config file
> (config/common_armv8a_linuxapp).
> v6 please?
>
next prev parent reply other threads:[~2018-01-19 6:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 7:49 [dpdk-dev] [PATCH] " Herbert Guan
2017-11-29 12:31 ` Jerin Jacob
2017-12-03 12:37 ` Herbert Guan
2017-12-15 4:06 ` Jerin Jacob
2017-12-18 2:51 ` Herbert Guan
2017-12-18 4:17 ` Jerin Jacob
2017-12-02 7:33 ` Pavan Nikhilesh Bhagavatula
2017-12-03 12:38 ` Herbert Guan
2017-12-03 14:20 ` Pavan Nikhilesh Bhagavatula
2017-12-04 7:14 ` Herbert Guan
2017-12-05 6:02 ` [dpdk-dev] [PATCH v2] " Herbert Guan
2017-12-18 2:54 ` [dpdk-dev] [PATCH v3] " Herbert Guan
2017-12-18 7:43 ` Jerin Jacob
2017-12-19 5:33 ` Herbert Guan
2017-12-19 7:24 ` Jerin Jacob
2017-12-21 5:33 ` [dpdk-dev] [PATCH v4] " Herbert Guan
2018-01-03 13:35 ` Jerin Jacob
2018-01-04 10:23 ` Herbert Guan
2018-01-04 10:20 ` [dpdk-dev] [PATCH v5] " Herbert Guan
2018-01-12 17:03 ` Thomas Monjalon
2018-01-15 10:57 ` Herbert Guan
2018-01-15 11:37 ` Thomas Monjalon
2018-01-18 23:54 ` Thomas Monjalon
2018-01-19 6:16 ` Herbert Guan [this message]
2018-01-19 6:10 ` [dpdk-dev] [PATCH v6] arch/arm: optimization for memcpy on ARM64 Herbert Guan
2018-01-20 16:21 ` 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=HE1PR08MB2809B7F0C0031F0E0CDCA7BA86EF0@HE1PR08MB2809.eurprd08.prod.outlook.com \
--to=herbert.guan@arm.com \
--cc=dev@dpdk.org \
--cc=jerin.jacob@caviumnetworks.com \
--cc=nd@arm.com \
--cc=thomas@monjalon.net \
/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).