[htl,v4,0/4] Rewrite THREAD_GSCOPE

Message ID 20210915171110.226187-1-bugaevc@gmail.com
Headers
Series Rewrite THREAD_GSCOPE |

Message

Sergey Bugaev Sept. 15, 2021, 5:11 p.m. UTC
  This is v4 of the patchset. The previous versions are at [0][1][2][3].

[0]: https://lists.gnu.org/archive/html/bug-hurd/2021-05/msg00053.html
[1]: https://lists.gnu.org/archive/html/bug-hurd/2021-05/msg00063.html
[2]: https://sourceware.org/pipermail/libc-alpha/2021-August/130614.html
[3]: https://sourceware.org/pipermail/libc-alpha/2021-September/130810.html

Changes since v3:
* Drop the two patches (1/5 and 5/5) that have been pushed
  (the remaining three patches are numbered 2/4, 3/4, 4/4)
* Use __libc_rwlock for dl_pthread_threads_lock instead of a plain int/lll

To test, before:
$ rpctrace -o >(grep -c wake) /bin/uname
GNU
58

After:
$ ./testrun.sh --tool=rpctrace /bin/uname 2> >(grep -c wake)
GNU
0

Sergey Bugaev (3):
  htl: Move thread table to ld.so
  htl: Reimplement GSCOPE
  elf: Remove THREAD_GSCOPE_IN_TCB

 elf/dl-support.c                         |  3 --
 htl/Versions                             |  2 -
 htl/pt-alloc.c                           | 50 +++++++++------------
 htl/pt-create.c                          |  8 ++--
 htl/pt-internal.h                        | 23 +++-------
 sysdeps/aarch64/nptl/tls.h               |  1 -
 sysdeps/alpha/nptl/tls.h                 |  1 -
 sysdeps/arc/nptl/tls.h                   |  1 -
 sysdeps/arm/nptl/tls.h                   |  1 -
 sysdeps/csky/nptl/tls.h                  |  1 -
 sysdeps/generic/ldsodefs.h               | 13 +++---
 sysdeps/generic/tls.h                    |  6 ---
 sysdeps/hppa/nptl/tls.h                  |  1 -
 sysdeps/htl/dl-support.c                 | 23 ++++++++++
 sysdeps/htl/dl-thread_gscope_wait.c      | 55 ++++++++++++++++++++++++
 sysdeps/htl/pt-key-delete.c              |  8 ++--
 sysdeps/htl/pthreadP.h                   |  2 -
 sysdeps/htl/raise.c                      |  8 +++-
 sysdeps/htl/thrd_current.c               |  7 ++-
 sysdeps/i386/nptl/tls.h                  |  1 -
 sysdeps/ia64/nptl/tls.h                  |  1 -
 sysdeps/m68k/nptl/tls.h                  |  1 -
 sysdeps/mach/hurd/htl/pt-sigstate-init.c |  2 +-
 sysdeps/mach/hurd/htl/pt-sysdep.c        |  2 +-
 sysdeps/mach/hurd/htl/pt-sysdep.h        |  2 +-
 sysdeps/mach/hurd/i386/tls.h             | 19 ++++++++
 sysdeps/mach/hurd/tls.h                  | 20 ---------
 sysdeps/microblaze/nptl/tls.h            |  1 -
 sysdeps/mips/nptl/tls.h                  |  1 -
 sysdeps/nios2/nptl/tls.h                 |  1 -
 sysdeps/powerpc/nptl/tls.h               |  1 -
 sysdeps/riscv/nptl/tls.h                 |  1 -
 sysdeps/s390/nptl/tls.h                  |  1 -
 sysdeps/sh/nptl/tls.h                    |  1 -
 sysdeps/sparc/nptl/tls.h                 |  1 -
 sysdeps/x86_64/nptl/tls.h                |  1 -
 36 files changed, 156 insertions(+), 115 deletions(-)
 create mode 100644 sysdeps/htl/dl-support.c
 create mode 100644 sysdeps/htl/dl-thread_gscope_wait.c
  

Comments

Samuel Thibault Sept. 15, 2021, 5:22 p.m. UTC | #1
Hello again Sergey,

Did you run make check to verify that you didn't break the world? :)

(i.e. no more failures than before the patch)

Samuel
  
Sergey Bugaev Sept. 15, 2021, 5:41 p.m. UTC | #2
On Wed, Sep 15, 2021 at 8:22 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> Did you run make check to verify that you didn't break the world? :)
>
> (i.e. no more failures than before the patch)

Not yet; it takes a long time here, I'll leave it running overnight
and report tomorrow.

By the way, for a project as important as glibc, I'd expect there'd be
a CI bot that would constantly build and test the latest master, if
not all submitted patches. But it looks like this hasn't been done
yet? [0]

[0]: https://sourceware.org/glibc/wiki/CICDDesign

Sergey
  
Samuel Thibault Sept. 15, 2021, 11:05 p.m. UTC | #3
Sergey Bugaev, le mer. 15 sept. 2021 20:41:45 +0300, a ecrit:
> On Wed, Sep 15, 2021 at 8:22 PM Samuel Thibault <samuel.thibault@gnu.org> wrote:
> > Did you run make check to verify that you didn't break the world? :)
> >
> > (i.e. no more failures than before the patch)
> 
> Not yet; it takes a long time here,

Ok, I have run it, it seems alright.

So I have pushed your series, thanks!

Samuel