From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 1B798397305A for ; Tue, 8 Jun 2021 18:19:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1B798397305A Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-22-tcovvUVQM5arXn3eX-mMOA-1; Tue, 08 Jun 2021 14:19:32 -0400 X-MC-Unique: tcovvUVQM5arXn3eX-mMOA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 360561009446; Tue, 8 Jun 2021 18:19:29 +0000 (UTC) Received: from oldenburg.str.redhat.com (ovpn-115-60.ams2.redhat.com [10.36.115.60]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4933160853; Tue, 8 Jun 2021 18:19:23 +0000 (UTC) From: Florian Weimer To: Adhemerval Zanella Cc: Peter Zijlstra , Sebastian Andrzej Siewior , linux-kselftest@vger.kernel.org, joel@joelfernandes.org, Andrey Semashev , kernel@collabora.com, shuah@kernel.org, Davidlohr Bueso , Peter Oskolkov , corbet@lwn.net, krisman@collabora.com, malteskarupke@fastmail.fm, Ingo Molnar , Darren Hart , acme@kernel.org, Steven Rostedt , =?utf-8?Q?Andr=C3=A9?= Almeida , Thomas Gleixner , libc-alpha@sourceware.org, linux-api@vger.kernel.org, z.figura12@gmail.com, Nicholas Piggin , linux-kernel@vger.kernel.org, pgriffais@valvesoftware.com Subject: Re: [PATCH v4 00/15] Add futex2 syscalls References: <20210603195924.361327-1-andrealmeid@collabora.com> <1622799088.hsuspipe84.astroid@bobo.none> <1622853816.mokf23xgnt.astroid@bobo.none> <22137ccd-c5e6-9fcc-a176-789558e9ab1e@collabora.com> <20210608122622.oxf662ruaawrtyrd@linutronix.de> <74c7f1c1-ca15-1e86-a988-a4d349ad16ef@linaro.org> Date: Tue, 08 Jun 2021 20:19:21 +0200 In-Reply-To: <74c7f1c1-ca15-1e86-a988-a4d349ad16ef@linaro.org> (Adhemerval Zanella's message of "Tue, 8 Jun 2021 15:08:44 -0300") Message-ID: <878s3k9q3a.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-List-Received-Date: Tue, 08 Jun 2021 18:19:37 -0000 * Adhemerval Zanella: > Also currently we don't have a specific usage. The proposed patch to > add the 'pthread_mutex_lock_any' and 'pthreada_timedlock_any' [3] > also did not gave much detail in realword usages or how it can be > leveraged. The current rwlock implementation in glibc uses a torn 32-bit futex read which is part of an atomically updated 64-bit word. That's just really, really ugly, and I suspect we could make that go away with futex2. Thanks, Florian