From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Leyi Rong" <leyi.rong@intel.com>, <bruce.richardson@intel.com>
Cc: <dev@dpdk.org>
Subject: RE: [PATCH] eal/x86: remove redundant round to improve performance
Date: Wed, 29 Mar 2023 11:30:22 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D8781C@smartserver.smartshare.dk> (raw)
In-Reply-To: <20230329091658.1599349-1-leyi.rong@intel.com>
> From: Leyi Rong [mailto:leyi.rong@intel.com]
> Sent: Wednesday, 29 March 2023 11.17
>
> In rte_memcpy_aligned(), one redundant round is taken in the 64 bytes
> block copy loops if the size is a multiple of 64. So, let the catch-up
> copy the last 64 bytes in this case.
>
> Suggested-by: Morten Brørup <mb@smartsharesystems.com>
> Signed-off-by: Leyi Rong <leyi.rong@intel.com>
> ---
> lib/eal/x86/include/rte_memcpy.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/eal/x86/include/rte_memcpy.h
> b/lib/eal/x86/include/rte_memcpy.h
> index d4d7a5cfc8..fd151be708 100644
> --- a/lib/eal/x86/include/rte_memcpy.h
> +++ b/lib/eal/x86/include/rte_memcpy.h
> @@ -846,7 +846,7 @@ rte_memcpy_aligned(void *dst, const void *src, size_t n)
> }
>
> /* Copy 64 bytes blocks */
> - for (; n >= 64; n -= 64) {
> + for (; n > 64; n -= 64) {
> rte_mov64((uint8_t *)dst, (const uint8_t *)src);
> dst = (uint8_t *)dst + 64;
> src = (const uint8_t *)src + 64;
> --
> 2.34.1
>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
next prev parent reply other threads:[~2023-03-29 9:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-29 9:16 Leyi Rong
2023-03-29 9:30 ` Morten Brørup [this message]
2023-03-29 10:20 ` Bruce Richardson
2023-04-04 13:15 ` David Marchand
2023-06-07 16:44 ` David Marchand
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=98CBD80474FA8B44BF855DF32C47DC35D8781C@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=leyi.rong@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).