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=-7.3 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 991B1C47082 for ; Tue, 8 Jun 2021 18:23:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 856C761380 for ; Tue, 8 Jun 2021 18:23:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231652AbhFHSZG (ORCPT ); Tue, 8 Jun 2021 14:25:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232827AbhFHSZE (ORCPT ); Tue, 8 Jun 2021 14:25:04 -0400 Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 020F2C061574 for ; Tue, 8 Jun 2021 11:22:57 -0700 (PDT) Received: by mail-qt1-x830.google.com with SMTP id r20so711490qtp.3 for ; Tue, 08 Jun 2021 11:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=nGNzR+o9zZcSK3DgIga4bw5mHaZMvM8bFKU8VLJam94=; b=YD4gTOo2PMuJlmavL/H7u9Qp8mdsQlQ7TAyzX2z4mWD2a+RWlrZ9jOLmSabQsLkUUY MIMhbdSX1Z9970av0crItFOwiwGbItQaDhVjd6vYKW3wchV7NNWHLjybOxFwvMvXcVWH HPwWZR1dCtmzye5khwI6kRA+ay/MruK9N+6/hBulWfplZSYUu00aDvGnn5Nbi34UYG7A V0DBDPWjJ+HzByKvG3C0GGsOCQ0WTiKIo30TEk0fMDXSSxD+3kT/9z/tK/6S8+7hUzCX zpnqQogpobPgrHLdHxhVKr5+UoeGHMEUitA352qwRez9YrGpBwX32LdaepbJl0ahfsq1 HDmQ== 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=nGNzR+o9zZcSK3DgIga4bw5mHaZMvM8bFKU8VLJam94=; b=M2khAU9cJYE7zAEIcOPZv3GlbbWMTlCArGW5ovq9xMD+iaXwLMj7PgK7rae8wUm7LI AjjGp4uuGQnrzy0bNbBtfRIOstIIWLh7h+rJ8CpS3KXa1BVyOiQ/w/OzvAcCo13DIfnc If28UrdMHhhtebNGocd4iEHYeZTlENyoUM2m2S3CDa3yJasKdhbJ7S0uypA42DsftFM1 V6pClH5MTygjTDiV/DKj63ucCb3f+WfpFiIIhhyLIns0O3mnpFw70hRlQosyB+A69QuT VzftCIkftOxTcvUHhWoTjYdFlpiwlYvLH4mv5ymwmty6iRUEFJu4oTKIK2HYw2gkF0bx D9/Q== X-Gm-Message-State: AOAM5302VGgaumRbonrYITUKl1/LRPi94DiwVDvdfYZAIPHZr27DEx2w BU/PO883jbgq4KFTheehYcO8Dg== X-Google-Smtp-Source: ABdhPJx6rJCefmbMgALRZq4VLRmbNNuDEoO3lVgsKOp/XHEZ7neGSMNeEEnuADsDxZ5MIUn+BvSu7Q== X-Received: by 2002:ac8:7590:: with SMTP id s16mr16195230qtq.259.1623176576091; Tue, 08 Jun 2021 11:22:56 -0700 (PDT) Received: from [192.168.1.4] ([177.194.59.218]) by smtp.gmail.com with ESMTPSA id q2sm6998062qkc.77.2021.06.08.11.22.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Jun 2021 11:22:55 -0700 (PDT) Subject: Re: [PATCH v4 00/15] Add futex2 syscalls To: Florian Weimer 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 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> <878s3k9q3a.fsf@oldenburg.str.redhat.com> From: Adhemerval Zanella Message-ID: Date: Tue, 8 Jun 2021 15:22:48 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <878s3k9q3a.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org On 08/06/2021 15:19, Florian Weimer wrote: > * 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. You are right, I had in the mind the multiple wait proposed by this patch and by the glib RFC one. Not only rwlock, but the posix semaphore might also be simplified on 32 bits I think.