public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/20] RFC: Add the CPU run-time library for C
@ 2018-06-12 22:19 H.J. Lu
  2018-06-12 22:19 ` [PATCH 02/20] libcpu-rt-c/x86: Add cacheinfo H.J. Lu
                   ` (21 more replies)
  0 siblings, 22 replies; 33+ messages in thread
From: H.J. Lu @ 2018-06-12 22:19 UTC (permalink / raw)
  To: libc-alpha

The current glibc has memory and string functions highly optimized for
the current processors on the market.  But it takes years for released
glibc to be installed on end-users machines.  In 2018, many machines
with the latest Intel processors are still running glibc 2.17, which
was released in February, 2013.

This patch set introduces the CPU run-time library for C, libcpu-rt-c.
libcpu-rt-c contains a subset of the C library with the optimized
functions.  The resulting libcpu-rt-c.so is binary compatible with
older versions of libc.so so that libcpu-rt-c.so can be used with
LD_PRELOAD or linked directly with applications.  For some workloads,
LD_PRELOAD=libcpu-rt-c.so has shown to improve performance by as much
as 20% on Skylake machine.

H.J. Lu (20):
  Initial empty CPU run-time library for C: libcpu-rt-c
  libcpu-rt-c/x86: Add cacheinfo
  libcpu-rt-c/x86: Add cpu-rt-tunables.c
  libcpu-rt-c/x86-64: Add memchr
  libcpu-rt-c/x86-64: Add memcmp
  libcpu-rt-c/x86-64: Add memcpy, memmove and mempcpy
  libcpu-rt-c/x86-64: Add memrchr
  libcpu-rt-c/x86-64: Add memset and wmemset
  libcpu-rt-c/i386: Add memcmp
  libcpu-rt-c: Don't use IFUNC memcmp in init_cpu_features
  libcpu-rt-c/x86-64: Add strchr
  libcpu-rt-c/x86-64: Add strcmp
  libcpu-rt-c/x86-64: Add strcpy
  libcpu-rt-c/x86-64: Add strlen
  libcpu-rt-c/x86-64: Add strcat
  libcpu-rt-c/x86-64: Add strnlen
  libcpu-rt-c/x86-64: Add strncat
  libcpu-rt-c/x86-64: Add strncmp
  libcpu-rt-c/x86-64: Add strncpy
  libcpu-rt-c/x86-64: Add strrchr

 Makeconfig                                    |  4 +-
 configure                                     | 17 +++++
 configure.ac                                  | 11 ++++
 cpu-rt-c/Makefile                             | 42 ++++++++++++
 cpu-rt-c/cpu-rt-misc.c                        | 22 +++++++
 cpu-rt-c/cpu-rt-support.h                     | 38 +++++++++++
 cpu-rt-c/cpu-rt-tunables.c                    | 28 ++++++++
 cpu-rt-c/dl-tunables.h                        | 57 ++++++++++++++++
 elf/dl-misc.c                                 |  2 +
 elf/dl-tunables.c                             |  2 +-
 shlib-versions                                |  3 +
 sysdeps/i386/Makefile                         |  7 ++
 sysdeps/i386/dl-procinfo.c                    | 16 +++--
 sysdeps/i386/i686/multiarch/Makefile          |  4 ++
 sysdeps/i386/i686/multiarch/memcmp-ia32.S     |  8 ++-
 sysdeps/i386/i686/multiarch/memcmp-sse4.S     |  2 +-
 sysdeps/i386/i686/multiarch/memcmp-ssse3.S    |  2 +-
 sysdeps/i386/i686/multiarch/memcmp.c          |  2 +-
 sysdeps/unix/sysv/linux/i386/dl-procinfo.h    |  4 +-
 sysdeps/x86/Makefile                          | 13 ++++
 sysdeps/x86/cacheinfo.c                       | 19 +++++-
 sysdeps/x86/cpu-features.c                    | 46 ++++++++-----
 sysdeps/x86/cpu-features.h                    | 12 +++-
 sysdeps/x86/cpu-rt-misc.c                     | 65 +++++++++++++++++++
 sysdeps/x86/cpu-rt-support.h                  | 21 ++++++
 sysdeps/x86/cpu-tunables.c                    | 14 +++-
 sysdeps/x86/dl-procinfo.c                     | 41 +++++++-----
 sysdeps/x86/dl-procinfo.h                     | 15 +++--
 sysdeps/x86/ldsodefs.h                        | 17 ++++-
 sysdeps/x86_64/Makefile                       | 10 +++
 sysdeps/x86_64/memchr.S                       |  2 +-
 sysdeps/x86_64/memmove.S                      | 12 +++-
 sysdeps/x86_64/memrchr.S                      |  6 ++
 sysdeps/x86_64/memset.S                       |  6 +-
 sysdeps/x86_64/multiarch/Makefile             | 30 +++++++++
 sysdeps/x86_64/multiarch/memchr-avx2.S        |  2 +-
 sysdeps/x86_64/multiarch/memchr-sse2.S        |  2 +-
 sysdeps/x86_64/multiarch/memchr.c             |  6 +-
 sysdeps/x86_64/multiarch/memcmp-avx2-movbe.S  |  2 +-
 sysdeps/x86_64/multiarch/memcmp-sse2.S        |  2 +-
 sysdeps/x86_64/multiarch/memcmp-sse4.S        |  2 +-
 sysdeps/x86_64/multiarch/memcmp-ssse3.S       |  2 +-
 sysdeps/x86_64/multiarch/memcmp.c             |  4 +-
 sysdeps/x86_64/multiarch/memcpy-ssse3-back.S  |  6 +-
 sysdeps/x86_64/multiarch/memcpy-ssse3.S       |  6 +-
 sysdeps/x86_64/multiarch/memcpy.c             | 14 ++--
 .../multiarch/memmove-avx-unaligned-erms.S    |  2 +-
 .../multiarch/memmove-avx512-no-vzeroupper.S  |  8 ++-
 .../multiarch/memmove-avx512-unaligned-erms.S |  2 +-
 .../multiarch/memmove-sse2-unaligned-erms.S   |  2 +-
 .../multiarch/memmove-vec-unaligned-erms.S    | 33 ++++++----
 sysdeps/x86_64/multiarch/memmove.c            | 10 ++-
 sysdeps/x86_64/multiarch/mempcpy.c            | 10 ++-
 sysdeps/x86_64/multiarch/memrchr-avx2.S       |  2 +-
 sysdeps/x86_64/multiarch/memrchr-sse2.S       |  2 +-
 sysdeps/x86_64/multiarch/memrchr.c            |  8 ++-
 .../multiarch/memset-avx2-unaligned-erms.S    |  2 +-
 .../multiarch/memset-avx512-no-vzeroupper.S   |  4 +-
 .../multiarch/memset-avx512-unaligned-erms.S  |  2 +-
 .../multiarch/memset-sse2-unaligned-erms.S    |  8 ++-
 .../multiarch/memset-vec-unaligned-erms.S     | 17 +++--
 sysdeps/x86_64/multiarch/memset.c             |  4 +-
 .../x86_64/multiarch/strcat-sse2-unaligned.S  |  2 +-
 sysdeps/x86_64/multiarch/strcat-sse2.S        |  2 +-
 sysdeps/x86_64/multiarch/strcat-ssse3.S       |  2 +-
 sysdeps/x86_64/multiarch/strcat.c             |  4 +-
 sysdeps/x86_64/multiarch/strchr-avx2.S        |  2 +-
 sysdeps/x86_64/multiarch/strchr-sse2-no-bsf.S |  2 +-
 sysdeps/x86_64/multiarch/strchr-sse2.S        |  2 +-
 sysdeps/x86_64/multiarch/strchr.c             |  4 +-
 sysdeps/x86_64/multiarch/strcmp-avx2.S        |  2 +-
 .../x86_64/multiarch/strcmp-sse2-unaligned.S  |  2 +-
 sysdeps/x86_64/multiarch/strcmp-sse2.S        |  2 +-
 sysdeps/x86_64/multiarch/strcmp-ssse3.S       |  2 +-
 sysdeps/x86_64/multiarch/strcmp.c             |  4 +-
 .../x86_64/multiarch/strcpy-sse2-unaligned.S  |  2 +-
 sysdeps/x86_64/multiarch/strcpy-sse2.S        |  2 +-
 sysdeps/x86_64/multiarch/strcpy-ssse3.S       |  2 +-
 sysdeps/x86_64/multiarch/strcpy.c             |  4 +-
 sysdeps/x86_64/multiarch/strlen-avx2.S        |  2 +-
 sysdeps/x86_64/multiarch/strlen-sse2.S        |  2 +-
 sysdeps/x86_64/multiarch/strlen.c             |  4 +-
 sysdeps/x86_64/multiarch/strncat-c.c          |  2 +-
 sysdeps/x86_64/multiarch/strncat.c            |  6 +-
 sysdeps/x86_64/multiarch/strncmp-sse2.S       |  2 +-
 sysdeps/x86_64/multiarch/strncmp.c            |  4 +-
 sysdeps/x86_64/multiarch/strncpy.c            |  4 +-
 sysdeps/x86_64/multiarch/strnlen-sse2.S       |  2 +-
 sysdeps/x86_64/multiarch/strnlen.c            | 20 +++++-
 sysdeps/x86_64/multiarch/strrchr-avx2.S       |  2 +-
 sysdeps/x86_64/multiarch/strrchr-sse2.S       |  2 +-
 sysdeps/x86_64/multiarch/strrchr.c            |  4 +-
 sysdeps/x86_64/multiarch/wmemset.c            | 10 ++-
 sysdeps/x86_64/strcat.S                       |  2 +
 sysdeps/x86_64/strncat.c                      |  9 +++
 95 files changed, 717 insertions(+), 166 deletions(-)
 create mode 100644 cpu-rt-c/Makefile
 create mode 100644 cpu-rt-c/cpu-rt-misc.c
 create mode 100644 cpu-rt-c/cpu-rt-support.h
 create mode 100644 cpu-rt-c/cpu-rt-tunables.c
 create mode 100644 cpu-rt-c/dl-tunables.h
 create mode 100644 sysdeps/x86/cpu-rt-misc.c
 create mode 100644 sysdeps/x86/cpu-rt-support.h
 create mode 100644 sysdeps/x86_64/strncat.c

-- 
2.17.1

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2018-06-19  8:20 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-12 22:19 [PATCH 00/20] RFC: Add the CPU run-time library for C H.J. Lu
2018-06-12 22:19 ` [PATCH 02/20] libcpu-rt-c/x86: Add cacheinfo H.J. Lu
2018-06-12 22:19 ` [PATCH 03/20] libcpu-rt-c/x86: Add cpu-rt-tunables.c H.J. Lu
2018-06-12 22:19 ` [PATCH 07/20] libcpu-rt-c/x86-64: Add memrchr H.J. Lu
2018-06-12 22:19 ` [PATCH 08/20] libcpu-rt-c/x86-64: Add memset and wmemset H.J. Lu
2018-06-12 22:19 ` [PATCH 04/20] libcpu-rt-c/x86-64: Add memchr H.J. Lu
2018-06-12 22:20 ` [PATCH 17/20] libcpu-rt-c/x86-64: Add strncat H.J. Lu
2018-06-12 22:20 ` [PATCH 14/20] libcpu-rt-c/x86-64: Add strlen H.J. Lu
2018-06-12 22:20 ` [PATCH 10/20] libcpu-rt-c: Don't use IFUNC memcmp in init_cpu_features H.J. Lu
2018-06-12 22:20 ` [PATCH 19/20] libcpu-rt-c/x86-64: Add strncpy H.J. Lu
2018-06-12 22:20 ` [PATCH 18/20] libcpu-rt-c/x86-64: Add strncmp H.J. Lu
2018-06-12 22:20 ` [PATCH 13/20] libcpu-rt-c/x86-64: Add strcpy H.J. Lu
2018-06-12 22:20 ` [PATCH 05/20] libcpu-rt-c/x86-64: Add memcmp H.J. Lu
2018-06-12 22:20 ` [PATCH 09/20] libcpu-rt-c/i386: " H.J. Lu
2018-06-12 22:20 ` [PATCH 12/20] libcpu-rt-c/x86-64: Add strcmp H.J. Lu
2018-06-12 22:20 ` [PATCH 20/20] libcpu-rt-c/x86-64: Add strrchr H.J. Lu
2018-06-12 22:20 ` [PATCH 06/20] libcpu-rt-c/x86-64: Add memcpy, memmove and mempcpy H.J. Lu
2018-06-12 22:20 ` [PATCH 01/20] Initial empty CPU run-time library for C: libcpu-rt-c H.J. Lu
2018-06-12 23:21   ` Joseph Myers
2018-06-13 11:21     ` H.J. Lu
2018-06-12 22:20 ` [PATCH 16/20] libcpu-rt-c/x86-64: Add strnlen H.J. Lu
2018-06-12 22:20 ` [PATCH 11/20] libcpu-rt-c/x86-64: Add strchr H.J. Lu
2018-06-12 22:20 ` [PATCH 15/20] libcpu-rt-c/x86-64: Add strcat H.J. Lu
2018-06-13  6:50 ` [PATCH 00/20] RFC: Add the CPU run-time library for C Florian Weimer
2018-06-13 10:14   ` H.J. Lu
2018-06-13 12:03     ` Adhemerval Zanella
2018-06-13 12:31       ` H.J. Lu
2018-06-13 13:25     ` Florian Weimer
2018-06-13 13:41       ` H.J. Lu
2018-06-13 14:20       ` Siddhesh Poyarekar
2018-06-18 13:42         ` Florian Weimer
2018-06-19  8:20           ` Siddhesh Poyarekar
2018-06-18 17:09 ` Carlos O'Donell

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).