From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-5.5 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 0F01B1F8C6 for ; Tue, 7 Sep 2021 17:05:54 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B5F193857825 for ; Tue, 7 Sep 2021 17:05:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5F193857825 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1631034352; bh=+2J1c0xrkJMCO2bQArf7f2W6oQFVdLBf4rll//x1opw=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=DXrOMotCiA7pQPGSpYyco9gE9q/hVy3H7Nq2GNVnoV+xYpR/xUlxbNISP2d+F8YD8 s7oM9WLMfbQsIyoKsczQEly1cfOlg69H920QUmIWUqKJn3OmR7HPT2XkBJc/Js8W2O JScHvj4U0LuUh2VBNNU8v3UCPaHHrbV3aUixgmCA= Received: from mail-qv1-xf32.google.com (mail-qv1-xf32.google.com [IPv6:2607:f8b0:4864:20::f32]) by sourceware.org (Postfix) with ESMTPS id EA35C385843B for ; Tue, 7 Sep 2021 17:05:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org EA35C385843B Received: by mail-qv1-xf32.google.com with SMTP id 62so5036226qvb.11 for ; Tue, 07 Sep 2021 10:05:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=+2J1c0xrkJMCO2bQArf7f2W6oQFVdLBf4rll//x1opw=; b=MahM51yB1QeTBpw9fnU5JHa9yyYx6ZcLOJWQEvWdnre8cKSr8hDv3KYZU2Sonq4PUL sBqgJHiYNB1vJj3op5y8/h+uPQ+ZsN8knwhlNK7KpFQMnH5knkzk7rYusPFwyyFE/Wnl 9ONJgYkOVVnczJQn0OIH/Y80cDpFeGrjIeOXHyo8sHaCRK8TVbOIR0lgP8wr07hqz2Tg C5ndqFJKbdqcYNzMIYis94XrbvaX04eeMiZY3LT09am5HgMMGR681OaxJcZ8JMVeh6P5 X15zvBiaW+m7gssv+x0LDLEgC0dWLnn9eTC/9S+pYuBLeH8Kz2WnZ3ItHkDhnekNUY2A O1EA== X-Gm-Message-State: AOAM530bZLNHdqKjGLigxUFjBzdqrLT325HJSLYraxt6VN9tNwDT7gEz 6eRbACxrDoVBYZGLi2pZc4gSOg== X-Google-Smtp-Source: ABdhPJzRplLX8YdQ5l8rW8ndmQlHDH6I0rAYWdKuS8vNCsXmkywV9LHv3AciBgiLWugMN/X1ZXtM2g== X-Received: by 2002:ad4:4647:: with SMTP id y7mr18160348qvv.54.1631034333482; Tue, 07 Sep 2021 10:05:33 -0700 (PDT) Received: from ?IPv6:2804:431:c7cb:733d:f360:5bf3:9813:d8f5? ([2804:431:c7cb:733d:f360:5bf3:9813:d8f5]) by smtp.gmail.com with ESMTPSA id b25sm9047446qka.23.2021.09.07.10.05.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Sep 2021 10:05:33 -0700 (PDT) Subject: Re: [PATCH htl v3 0/5] Rewrite THREAD_GSCOPE To: Sergey Bugaev , libc-alpha@sourceware.org, bug-hurd@gnu.org References: <20210907133325.255690-1-bugaevc@gmail.com> Message-ID: <80b2464c-5a48-b97f-d68f-042044bf69bf@linaro.org> Date: Tue, 7 Sep 2021 14:05:30 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210907133325.255690-1-bugaevc@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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: , From: Adhemerval Zanella via Libc-alpha Reply-To: Adhemerval Zanella Cc: samuel.thibault@gnu.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 07/09/2021 10:33, Sergey Bugaev via Libc-alpha wrote: > Hello, > > this is yet another revision of the same patchset to stop issuing many > redundant gsync_wake () calls. Following the brief feedback I got the last > time, it switches most users of THREAD_GSCOPE_IN_TCB to PTHREAD_IN_LIBC, then > actually introduces the new GSCOPE implementation, and then finally drops the > remaining uses of THREAD_GSCOPE_IN_TCB entirely, since it's not always on. > > Things still seem to build and work somewhat (tested on GNU/Hurd i686 and > GNU/Linux x86_64). rpctrace uname still shows that there are no more > gsync_wake () calls. > > Apparently dlopen (RTLD_GLOBAL) is a good way to trigger THREAD_GSCOPE_WAIT (). > I have written a test program that spawns 100 threads, then each of the threads > dlopen's 100 shared objects, then dlclose's them back. On GNU/Linux, I have > verified with GDB that it hits NPTL's __thread_gscope_wait (). I haven't been > able to verify the same on the Hurd due to the general flakiness of GDB there, > but I have ran the program with the patched glibc multiple times and it doesn't > crash, so I assume it's working fine. I can't voucher for Hurd changes, but the generic ones that might affect Linux seems ok (the THREAD_GSCOPE_IN_TCB define is a nice cleanup).