public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: caiyinyu <caiyinyu@loongson.cn>
To: Xi Ruoyao <xry111@xry111.site>, libc-alpha@sourceware.org
Cc: Wang Xuerui <i@xen0n.name>,
	Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Subject: Re: [PATCH 0/5] LoongArch: Multiarch string and memory copy routines for unaligned access
Date: Tue, 18 Apr 2023 11:01:02 +0800	[thread overview]
Message-ID: <f3e31f82-426f-7554-b66a-f321c9d78493@loongson.cn> (raw)
In-Reply-To: <20230415112340.38431-1-xry111@xry111.site>

We are preparing a series of patches that include ifunc support 
(aligned/unaligned/vectorized assembly implementation) for str/mem 
functions, tunable functionality, and vectorized _dl_runtime_resolve. 
However, we are not currently able to submit them to the upstream 
community. We may consider publishing them on GitHub in the future like 
gcc and binutils.

We will temporarily keep your patches.

在 2023/4/15 下午7:23, Xi Ruoyao 写道:
> LoongArch CPUs may have hardware unaligned access support.  For the
> launched LoongArch CPUs, those branded as Loongson-3 (for desktops or
> servers) have hardware unaligned access support, but those branded as
> Loongson-2 (for embedded or industrial applications) do not.
>
> On Linux, the unaligned access support is indicated by a HWCAP bit
> provided by the kernel.  So we can multiarch stpcpy and memcpy with
> ifunc to take the advantage on the CPUs with unaligned access support.
>
> On a Loongson-3A5000HV CPU running at 2.5GHz, "make bench" has shown
> these changes can really improve the performance:
>
> - https://www.linuxfromscratch.org/~xry111/loongarch-ual-bench/bench-stpcpy-summary.txt
> - https://www.linuxfromscratch.org/~xry111/loongarch-ual-bench/bench-memcpy-summary.txt
>
> Xi Ruoyao (5):
>    LoongArch: Add bits/hwcap.h for Linux
>    LoongArch: Add LOONGARCH_HAVE_UAL macro
>    string: stpcpy.c: Only alias __stpcpy to stpcpy if STPCPY undefined
>    LoongArch: Multiarch stpcpy for unaligned access
>    LoongArch: Multiarch memcpy for unaligned access
>
>   string/stpcpy.c                               |  3 ++
>   sysdeps/loongarch/loongarch-features.h        | 26 ++++++++++
>   sysdeps/loongarch/multiarch/Makefile          |  6 +++
>   sysdeps/loongarch/multiarch/memcpy-generic.c  | 27 ++++++++++
>   sysdeps/loongarch/multiarch/memcpy-ual.c      | 50 +++++++++++++++++++
>   sysdeps/loongarch/multiarch/memcpy.c          | 39 +++++++++++++++
>   sysdeps/loongarch/multiarch/stpcpy-generic.c  | 25 ++++++++++
>   sysdeps/loongarch/multiarch/stpcpy-ual.c      | 43 ++++++++++++++++
>   sysdeps/loongarch/multiarch/stpcpy.c          | 37 ++++++++++++++
>   .../loongarch/multiarch/wordcopy-ual-inline.c | 31 ++++++++++++
>   .../unix/sysv/linux/loongarch/bits/hwcap.h    | 37 ++++++++++++++
>   .../sysv/linux/loongarch/loongarch-features.h | 30 +++++++++++
>   sysdeps/unix/sysv/linux/loongarch/sysdep.h    |  1 +
>   13 files changed, 355 insertions(+)
>   create mode 100644 sysdeps/loongarch/loongarch-features.h
>   create mode 100644 sysdeps/loongarch/multiarch/Makefile
>   create mode 100644 sysdeps/loongarch/multiarch/memcpy-generic.c
>   create mode 100644 sysdeps/loongarch/multiarch/memcpy-ual.c
>   create mode 100644 sysdeps/loongarch/multiarch/memcpy.c
>   create mode 100644 sysdeps/loongarch/multiarch/stpcpy-generic.c
>   create mode 100644 sysdeps/loongarch/multiarch/stpcpy-ual.c
>   create mode 100644 sysdeps/loongarch/multiarch/stpcpy.c
>   create mode 100644 sysdeps/loongarch/multiarch/wordcopy-ual-inline.c
>   create mode 100644 sysdeps/unix/sysv/linux/loongarch/bits/hwcap.h
>   create mode 100644 sysdeps/unix/sysv/linux/loongarch/loongarch-features.h
>


      parent reply	other threads:[~2023-04-18  3:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-15 11:23 Xi Ruoyao
2023-04-15 11:23 ` [PATCH 1/5] LoongArch: Add bits/hwcap.h for Linux Xi Ruoyao
2023-04-15 11:23 ` [PATCH 2/5] LoongArch: Add LOONGARCH_HAVE_UAL macro Xi Ruoyao
2023-04-15 11:23 ` [PATCH 3/5] string: stpcpy.c: Only alias __stpcpy to stpcpy if STPCPY undefined Xi Ruoyao
2023-04-15 11:23 ` [PATCH 4/5] LoongArch: Multiarch stpcpy for unaligned access Xi Ruoyao
2023-04-15 11:23 ` [PATCH 5/5] LoongArch: Multiarch memcpy " Xi Ruoyao
2023-04-18  3:01 ` caiyinyu [this message]

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=f3e31f82-426f-7554-b66a-f321c9d78493@loongson.cn \
    --to=caiyinyu@loongson.cn \
    --cc=adhemerval.zanella@linaro.org \
    --cc=i@xen0n.name \
    --cc=libc-alpha@sourceware.org \
    --cc=xry111@xry111.site \
    /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).