From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id E4F301F85E for ; Fri, 13 Jul 2018 13:08:54 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=Zx/fcWbDzq3zXAcg 81Eti5TqBuQwoYt0G9Xals3glhnrw6LfQro3D0X6VP+/kgrs4Ny2uIwUnjYiAXji xBDBekhcnRgVHuczUZZMVz481ExILj7/QpIumxjpENJ8eom9ppPMH+n5wgAYRBwa hPOTXHMAxMRvy8Oo6XWLotStpuo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=9FC0sbbgAI5Kqx1zN+7T1R tuLGQ=; b=sQ/7UWcxeW8YzFfqGmQ0Un+mnUfs+P98C5rlRbC3lxh/k5MeRIripw ZAfrK9Lf/liPzYnn2vdc4ps+Uf9CeRCKInQ/g2i0baZcyjvWPwPrdPtQtb5o5sTt ugyJxTioHJTzf1UEajd5Y5dGInfNabQ/7Zz/NnUIPfpha6GLDk1Bg= Received: (qmail 5921 invoked by alias); 13 Jul 2018 13:08:52 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 5897 invoked by uid 89); 13 Jul 2018 13:08:51 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-ua0-f193.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:openpgp:autocrypt:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=kLrqr7MpEUQXUqVA9RkuZlCptzlmX1Wdw86DiznlCko=; b=elP0VydRfkkzEz8EbcxngHm2E0QkDW3uALKsx//QqpJphkgJ7vEkxwDVqz+BZWmky3 AU/MvMtRDm8qf197tUsQY1cCwIBIZg3ZWrLu2KSu7uSzZ0vn/d8unvs8wuWF7TlmCQxt F+PKDf0IdLxZ1rF9RZa3Nkk3Pc1ozUSp8t+8s= Subject: Re: [PATCH v8 2/8] nptl: Add C11 threads mtx_* functions To: Florian Weimer , libc-alpha@sourceware.org References: <1517591084-11347-1-git-send-email-adhemerval.zanella@linaro.org> <1517591084-11347-3-git-send-email-adhemerval.zanella@linaro.org> <44460c52-bff8-d7a7-4d7e-f017ad268c21@redhat.com> <4be08a33-8957-0494-857b-5c26869778b1@linaro.org> <148abea8-72ba-e474-c0ac-251a546717cf@linaro.org> <94903f9e-87b3-6170-3efe-ee2ce04d336d@redhat.com> From: Adhemerval Zanella Openpgp: preference=signencrypt Message-ID: <5565d413-6ddc-ff19-2925-fd673ab5165b@linaro.org> Date: Fri, 13 Jul 2018 10:08:44 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <94903f9e-87b3-6170-3efe-ee2ce04d336d@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit On 12/07/2018 17:38, Florian Weimer wrote: > On 07/12/2018 10:30 PM, Adhemerval Zanella wrote: > >>> I'm concerned about this because in the future, we might compile the implementations to remove checks that are not needed for the C11 implementations. >> >> Why kind of scenario do you have in mind? Maybe use a more streamlined >> internal implementation for C11 threads? > > Yes, the polymorphic mutex types must have *some* overhead (think of speculatively executing the wrong atomics), and less polymorphism should improve performance. I think it would quite feasible in next releases to refactor the mutex code into C11 required operation and POSIX one and optimize C11 implementation with a simpler internal one. The bulk of the work is disentangle the mutex code (I started to check on this sometime ago, but got sidetracked).