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.6 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 C17BC1F85E for ; Fri, 13 Jul 2018 13:10:40 +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=HiQnK6Aby0tXRkmO G7HAsrtfPa/LmW0wWw/XlEgHHP8he0OCHh+aMuM0BkKedZ3mSADyl0hDfSI61eKu H7yfDLmvnCDknLRZZYedzguhh9/rGY6QHS/anTBYdL7vVC06YFN4txLEBBggP5/x Bru9T6FO1qpZMSSAJvwnIYTuXJc= 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=enpNAF2lH41Me9K8/gP+H5 03dv0=; b=Zws2tCq0db+2XPBWJ0ysnvg93U6K45lzv2y+HKvvCcui2batnlKit3 R92DNsuMMf+WcPDNmahCCDEY6LxwR73UTLVHd94LoUMwRTAVs3JyaFLukUO+pFtA +Zv/FcVbc2F5rpe/BfjH9fDRN7gZ/1KjBwrFOKjvcnNmeoZD2moJM= Received: (qmail 9332 invoked by alias); 13 Jul 2018 13:10:34 -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 9175 invoked by uid 89); 13 Jul 2018 13:10:33 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mx1.redhat.com Subject: Re: [PATCH v8 2/8] nptl: Add C11 threads mtx_* functions To: Adhemerval Zanella , 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> <5565d413-6ddc-ff19-2925-fd673ab5165b@linaro.org> From: Florian Weimer Message-ID: <8030bac6-0f33-b3e6-417f-ea292c4da317@redhat.com> Date: Fri, 13 Jul 2018 15:10:29 +0200 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: <5565d413-6ddc-ff19-2925-fd673ab5165b@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 07/13/2018 03:08 PM, Adhemerval Zanella wrote: > > > 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). Sure, we can delay this work somewhat, but I'd like to backport the optimization into 2.28 once we have it, to discourage such invalid uses. Thanks, Florian