public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Florian Weimer <fweimer@redhat.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH 0/4] nptl: Move spinlock symbols into libc
Date: Fri, 23 Apr 2021 07:36:15 -0700	[thread overview]
Message-ID: <CAMe9rOqZaTB+BB=KzQctRM9wbwqa=aT3TP6R3WFtj_W0x2jYaw@mail.gmail.com> (raw)
In-Reply-To: <cover.1619175406.git.fweimer@redhat.com>

On Fri, Apr 23, 2021 at 7:23 AM Florian Weimer via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> This is slightly more complicated than usual because there are many C
> and assembler implementations of the spinlock functions.
>
> Full consolidation in a single C implementation is not possible because
> the algorithm is subtly different, and PTHREAD_SPINLOCK_INITIALIZER
> varies.  I did not try to simplify this, but instead patched all the
> different implementations.
>
> Tested on i686-linux-gnu, powerpc64le-linux-gnu, x86_64-linux-gnu.
> Built with build-many-glibcs.py, both with defaults and with binutils
> 2.33 and GCC 9.
>
> Florian Weimer (4):
>   nptl: Move pthread_spin_destroy into libc
>   nptl: Move pthread_spin_init, Move pthread_spin_unlock  into libc
>   nptl: Move pthread_spin_lock into libc
>   nptl: Move pthread_spin_trylock into libc
>
>  nptl/Makefile                                 | 10 ++++-----
>  nptl/Versions                                 | 15 ++++++++-----
>  nptl/pthread_spin_destroy.c                   | 11 ++++++++--
>  nptl/pthread_spin_init.c                      |  8 ++++++-
>  nptl/pthread_spin_lock.c                      |  8 ++++++-
>  nptl/pthread_spin_trylock.c                   | 10 ++++++++-
>  nptl/pthread_spin_unlock.c                    | 10 ++++++++-
>  sysdeps/alpha/nptl/pthread_spin_lock.S        | 14 +++++++++----
>  sysdeps/alpha/nptl/pthread_spin_trylock.S     | 16 ++++++++++----
>  sysdeps/hppa/nptl/pthread_spin_init.c         | 10 ++++++++-
>  sysdeps/hppa/nptl/pthread_spin_unlock.c       | 10 ++++++++-
>  sysdeps/i386/nptl/pthread_spin_lock.S         | 10 +++++++--
>  sysdeps/i386/nptl/pthread_spin_unlock.S       | 16 +++++++++-----
>  sysdeps/i386/pthread_spin_trylock.S           | 13 +++++++++---
>  sysdeps/ia64/nptl/pthread_spin_lock.c         | 10 ++++++++-
>  sysdeps/ia64/nptl/pthread_spin_trylock.c      | 10 ++++++++-
>  sysdeps/ia64/nptl/pthread_spin_unlock.c       | 11 ++++++++--
>  sysdeps/powerpc/nptl/pthread_spin_lock.c      |  8 ++++++-
>  sysdeps/powerpc/nptl/pthread_spin_trylock.c   | 10 ++++++++-
>  sysdeps/powerpc/nptl/pthread_spin_unlock.c    | 10 ++++++++-
>  sysdeps/sh/nptl/pthread_spin_lock.c           |  8 ++++++-
>  sysdeps/sh/nptl/pthread_spin_trylock.S        | 16 ++++++++++----
>  sysdeps/sh/nptl/pthread_spin_unlock.S         | 21 ++++++++++++-------
>  sysdeps/sparc/sparc32/pthread_spin_lock.S     | 10 +++++++--
>  sysdeps/sparc/sparc32/pthread_spin_trylock.S  | 12 +++++++++--
>  sysdeps/sparc/sparc64/pthread_spin_lock.S     | 10 +++++++--
>  sysdeps/sparc/sparc64/pthread_spin_trylock.S  | 12 +++++++++--
>  sysdeps/sparc/sparc64/pthread_spin_unlock.S   | 14 ++++++++++---
>  sysdeps/unix/sysv/linux/aarch64/libc.abilist  | 10 +++++++++
>  .../sysv/linux/aarch64/libpthread.abilist     |  5 -----
>  sysdeps/unix/sysv/linux/alpha/libc.abilist    | 10 +++++++++
>  .../unix/sysv/linux/alpha/libpthread.abilist  |  5 -----
>  sysdeps/unix/sysv/linux/arc/libc.abilist      | 10 +++++++++
>  .../unix/sysv/linux/arc/libpthread.abilist    |  5 -----
>  sysdeps/unix/sysv/linux/arm/be/libc.abilist   | 10 +++++++++
>  .../unix/sysv/linux/arm/be/libpthread.abilist |  5 -----
>  sysdeps/unix/sysv/linux/arm/le/libc.abilist   | 10 +++++++++
>  .../unix/sysv/linux/arm/le/libpthread.abilist |  5 -----
>  sysdeps/unix/sysv/linux/csky/libc.abilist     | 10 +++++++++
>  .../unix/sysv/linux/csky/libpthread.abilist   |  5 -----
>  sysdeps/unix/sysv/linux/hppa/libc.abilist     | 10 +++++++++
>  .../unix/sysv/linux/hppa/libpthread.abilist   |  5 -----
>  sysdeps/unix/sysv/linux/i386/libc.abilist     | 10 +++++++++
>  .../unix/sysv/linux/i386/libpthread.abilist   |  5 -----
>  sysdeps/unix/sysv/linux/ia64/libc.abilist     | 10 +++++++++
>  .../unix/sysv/linux/ia64/libpthread.abilist   |  5 -----
>  .../sysv/linux/m68k/coldfire/libc.abilist     | 10 +++++++++
>  .../linux/m68k/coldfire/libpthread.abilist    |  5 -----
>  .../unix/sysv/linux/m68k/m680x0/libc.abilist  | 10 +++++++++
>  .../sysv/linux/m68k/m680x0/libpthread.abilist |  5 -----
>  .../sysv/linux/microblaze/be/libc.abilist     | 10 +++++++++
>  .../linux/microblaze/be/libpthread.abilist    |  5 -----
>  .../sysv/linux/microblaze/le/libc.abilist     | 10 +++++++++
>  .../linux/microblaze/le/libpthread.abilist    |  5 -----
>  .../sysv/linux/mips/mips32/fpu/libc.abilist   | 10 +++++++++
>  .../sysv/linux/mips/mips32/libpthread.abilist |  5 -----
>  .../sysv/linux/mips/mips32/nofpu/libc.abilist | 10 +++++++++
>  .../sysv/linux/mips/mips64/libpthread.abilist |  5 -----
>  .../sysv/linux/mips/mips64/n32/libc.abilist   | 10 +++++++++
>  .../sysv/linux/mips/mips64/n64/libc.abilist   | 10 +++++++++
>  sysdeps/unix/sysv/linux/nios2/libc.abilist    | 10 +++++++++
>  .../unix/sysv/linux/nios2/libpthread.abilist  |  5 -----
>  .../linux/powerpc/powerpc32/fpu/libc.abilist  | 10 +++++++++
>  .../powerpc/powerpc32/libpthread.abilist      |  5 -----
>  .../powerpc/powerpc32/nofpu/libc.abilist      | 10 +++++++++
>  .../linux/powerpc/powerpc64/be/libc.abilist   | 10 +++++++++
>  .../powerpc/powerpc64/be/libpthread.abilist   |  5 -----
>  .../linux/powerpc/powerpc64/le/libc.abilist   | 10 +++++++++
>  .../powerpc/powerpc64/le/libpthread.abilist   |  5 -----
>  .../unix/sysv/linux/riscv/rv32/libc.abilist   | 10 +++++++++
>  .../sysv/linux/riscv/rv32/libpthread.abilist  |  5 -----
>  .../unix/sysv/linux/riscv/rv64/libc.abilist   | 10 +++++++++
>  .../sysv/linux/riscv/rv64/libpthread.abilist  |  5 -----
>  .../unix/sysv/linux/s390/s390-32/libc.abilist | 10 +++++++++
>  .../linux/s390/s390-32/libpthread.abilist     |  5 -----
>  .../unix/sysv/linux/s390/s390-64/libc.abilist | 10 +++++++++
>  .../linux/s390/s390-64/libpthread.abilist     |  5 -----
>  sysdeps/unix/sysv/linux/sh/be/libc.abilist    | 10 +++++++++
>  .../unix/sysv/linux/sh/be/libpthread.abilist  |  5 -----
>  sysdeps/unix/sysv/linux/sh/le/libc.abilist    | 10 +++++++++
>  .../unix/sysv/linux/sh/le/libpthread.abilist  |  5 -----
>  .../sysv/linux/sparc/sparc32/libc.abilist     | 10 +++++++++
>  .../linux/sparc/sparc32/libpthread.abilist    |  5 -----
>  .../sysv/linux/sparc/sparc64/libc.abilist     | 10 +++++++++
>  .../linux/sparc/sparc64/libpthread.abilist    |  5 -----
>  .../unix/sysv/linux/x86_64/64/libc.abilist    | 10 +++++++++
>  .../sysv/linux/x86_64/64/libpthread.abilist   |  5 -----
>  .../unix/sysv/linux/x86_64/x32/libc.abilist   | 10 +++++++++
>  .../sysv/linux/x86_64/x32/libpthread.abilist  |  5 -----
>  sysdeps/x86_64/nptl/pthread_spin_lock.S       | 10 +++++++--
>  sysdeps/x86_64/nptl/pthread_spin_trylock.S    | 13 +++++++++---
>  sysdeps/x86_64/nptl/pthread_spin_unlock.S     | 16 +++++++++-----
>  92 files changed, 606 insertions(+), 221 deletions(-)
>
> --
> 2.30.2
>

All patches look good to me.

Thanks.

-- 
H.J.

      parent reply	other threads:[~2021-04-23 14:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 12:01 Florian Weimer
2021-04-23 12:01 ` [PATCH 1/4] nptl: Move pthread_spin_destroy " Florian Weimer
2021-04-23 12:01 ` [PATCH 2/4] nptl: Move pthread_spin_init, Move pthread_spin_unlock " Florian Weimer
2021-04-23 12:03 ` [PATCH 3/4] nptl: Move pthread_spin_lock " Florian Weimer
2021-04-23 12:03 ` [PATCH 4/4] nptl: Move pthread_spin_trylock " Florian Weimer
2021-04-23 14:36 ` H.J. Lu [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='CAMe9rOqZaTB+BB=KzQctRM9wbwqa=aT3TP6R3WFtj_W0x2jYaw@mail.gmail.com' \
    --to=hjl.tools@gmail.com \
    --cc=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /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).