From patchwork Wed Sep 15 17:11:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Bugaev X-Patchwork-Id: 45054 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 25CCE385843D for ; Wed, 15 Sep 2021 17:11:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 25CCE385843D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631725908; bh=20LxmtQ+EqAgZ7MrLrtp9bR0eyUDRDkha2qUzhdUvDA=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=mN2HxiqrCGA0FypjOYyqgo7I/ygKw5357TWCCqcrts/OwiQKyhN2e/PlvDt3fN+18 DOmLRC0jGqPh1cAS+HeQh06nAt3gWNGuY3k1UV+kYINEC1yIdveu4WRkKEUygT7JiF EFAjaYEwK69FpihMblPPGsW/79H3NpLaPfND9JPk= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-lj1-x22c.google.com (mail-lj1-x22c.google.com [IPv6:2a00:1450:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id EFA9A3858C39 for ; Wed, 15 Sep 2021 17:11:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EFA9A3858C39 Received: by mail-lj1-x22c.google.com with SMTP id j12so2287958ljg.10 for ; Wed, 15 Sep 2021 10:11:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=20LxmtQ+EqAgZ7MrLrtp9bR0eyUDRDkha2qUzhdUvDA=; b=iaa9jkXpILv7uiTzV9+IxAR5Fpvj7iLCVmWPM4rsdFGxgGL9ow5KPo7r4MumH4KWAq aOhXN9w5IZErYR7bDQEBlwc3o3zO+CdRSFX+1yskzqPxRephkmFxoPvPnZvpcTiT6IF2 hajRBAe1Rdp5zoFMtaCnEz8t6KBC2XbQGZ787DHDtVla7u/BNwCuFns5ud1oGPD+0tLY 2htw7Q298vPQNX+wTUx8XkzVt4JoUJI+O31JzcLHUZ8l0iwL0C6fpxQc0apgvAB68hp5 01M+6d4OPX4nK3lpIYFGmN5Udo6M1fzV6ICaWVStdNTVBrcYBGoOxpdb03TZ2DfXQxc4 weyg== X-Gm-Message-State: AOAM533ZO2D3hjDm9Qdau2+HiN5w7PxFJSN188GuQhI73e1klj01Mbye UuWdW8WS0r/xuRcs2WlUg+jmNVdKIx+uOSK/ X-Google-Smtp-Source: ABdhPJwrFpG558ibP9knPYZnfrZ2g31O3PPrnZTqA/bhwx5oyt6l4vByvBHXrEbnBH5XgUt9WLJS+w== X-Received: by 2002:a2e:155a:: with SMTP id 26mr78686ljv.34.1631725885496; Wed, 15 Sep 2021 10:11:25 -0700 (PDT) Received: from badwolf.office.smartdec.ru ([81.23.5.115]) by smtp.googlemail.com with ESMTPSA id i12sm31095lfb.301.2021.09.15.10.11.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Sep 2021 10:11:25 -0700 (PDT) To: libc-alpha@sourceware.org, bug-hurd@gnu.org Subject: [PATCH htl v4 0/4] Rewrite THREAD_GSCOPE Date: Wed, 15 Sep 2021 20:11:07 +0300 Message-Id: <20210915171110.226187-1-bugaevc@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Sergey Bugaev via Libc-alpha From: Sergey Bugaev Reply-To: Sergey Bugaev Cc: samuel.thibault@gnu.org, Sergey Bugaev Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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