From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31542C4743F for ; Tue, 8 Jun 2021 18:19:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0FD3961376 for ; Tue, 8 Jun 2021 18:19:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234047AbhFHSVd (ORCPT ); Tue, 8 Jun 2021 14:21:33 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:60278 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234005AbhFHSV3 (ORCPT ); Tue, 8 Jun 2021 14:21:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623176375; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=U5VkwIvxnbWpvc1/0iPLy1KO47p1rlWOYHzaaUg7B9s=; b=bYHGUNWtIPLpJAA/vMk38e2l0cirJBgAYBYA+RPt1KZ8I9H3ZGXLbfv5xg+KeEH3GoC5R8 RZmx4i70DMHCDqvJZeSRvi8XRYNnwjWd0uV7a400/I+02qBNSa8SvsHMs+hV/KuG+RZy3P 1hcWa7WvkcE1pnmXsj9IzsJ0WgwrmuU= 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * 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