unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy via Libc-alpha <libc-alpha@sourceware.org>
To: Naohiro Tamura <naohirot@fujitsu.com>
Cc: libc-alpha@sourceware.org, Wilco Dijkstra <Wilco.Dijkstra@arm.com>
Subject: Re: [PATCH] AArch64: Update A64FX memset not to degrade at 16KB
Date: Fri, 3 Sep 2021 16:01:58 +0100	[thread overview]
Message-ID: <20210903150156.GF21740@arm.com> (raw)
In-Reply-To: <20210827050304.543471-1-naohirot@fujitsu.com>

The 08/27/2021 05:03, Naohiro Tamura via Libc-alpha wrote:
> This patch updates unroll8 code so as not to degrade at the peak
> performance 16KB for both FX1000 and FX700.
> 
> Inserted 2 instructions at the beginning of the unroll8 loop,
> cmp and branch, are a workaround that is found heuristically.
> 
> Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>

thanks, i committed this now.


> ---
>  sysdeps/aarch64/multiarch/memset_a64fx.S | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/sysdeps/aarch64/multiarch/memset_a64fx.S b/sysdeps/aarch64/multiarch/memset_a64fx.S
> index 7bf759b6a753..f7dfdaace7cf 100644
> --- a/sysdeps/aarch64/multiarch/memset_a64fx.S
> +++ b/sysdeps/aarch64/multiarch/memset_a64fx.S
> @@ -96,7 +96,14 @@ L(vl_agnostic): // VL Agnostic
>  L(unroll8):
>  	sub	count, count, tmp1
>  	.p2align 4
> -1:	st1b_unroll 0, 7
> +	// The 2 instructions at the beginning of the following loop,
> +	// cmp and branch, are a workaround so as not to degrade at
> +	// the peak performance 16KB.
> +	// It is found heuristically and the branch condition, b.ne,
> +	// is chosen intentionally never to jump.
> +1:	cmp	xzr, xzr
> +	b.ne	1b
> +	st1b_unroll 0, 7
>  	add	dst, dst, tmp1
>  	subs	count, count, tmp1
>  	b.hi	1b
> -- 
> 2.17.1
> 

  reply	other threads:[~2021-09-03 15:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-27  5:03 [PATCH] AArch64: Update A64FX memset not to degrade at 16KB Naohiro Tamura via Libc-alpha
2021-09-03 15:01 ` Szabolcs Nagy via Libc-alpha [this message]
2021-09-05 23:51   ` naohirot--- via Libc-alpha
2021-09-06  0:16     ` naohirot--- via Libc-alpha
2021-09-06  6:17       ` Florian Weimer via Libc-alpha
     [not found]         ` <TYAPR01MB602525FB59480A6CEF989F9CDFD29@TYAPR01MB6025.jpnprd01.prod.outlook.com>
2021-09-06  8:44           ` naohirot--- via Libc-alpha
2021-09-06 10:20             ` 'Szabolcs Nagy' via Libc-alpha
2021-09-06 11:56               ` naohirot--- via Libc-alpha
2021-09-06 15:54         ` Joseph Myers
2021-09-16 11:53           ` Florian Weimer via Libc-alpha
2021-09-17  0:49             ` naohirot--- via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

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

  git send-email \
    --in-reply-to=20210903150156.GF21740@arm.com \
    --to=libc-alpha@sourceware.org \
    --cc=Wilco.Dijkstra@arm.com \
    --cc=naohirot@fujitsu.com \
    --cc=szabolcs.nagy@arm.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 read-only IMAP folder(s) and NNTP newsgroup(s).