From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) by sourceware.org (Postfix) with ESMTPS id 89FF63857433 for ; Tue, 8 Jun 2021 18:22:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 89FF63857433 Received: by mail-qt1-x82e.google.com with SMTP id z4so12995851qts.4 for ; Tue, 08 Jun 2021 11:22:56 -0700 (PDT) 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=KzuxiKXWv9lp2+teBY0WR3F6gnb8xIaRm5B2iyuogFtKOs3widhJSysBkEx0tOFhdE N8o4R+px38FWPSW5mhZEIc0LuazgXvFf8yBDg6ape5pI76UQzR1EwRAisxPkPAEWdF5I sHuXyChKW/nuXjIC8ierhdFv50PeHh+SpDM+Sz6JMCw7//tPdUyzfjDV3KLh1VA4qzWn WT9eh2W9HjEeLMt1BzYRt7/ap1FyB58HzqWjc9d43j/1+c6CkE7GSlZSoG2GtBj5Yxsf 0yd/MbEV1rjUrbzIAOdSMv1WsryRrbTDfNHqELbgkUZi15fyZqv/sSEDN7xRAxYzDgVU 5Iog== X-Gm-Message-State: AOAM531bZks3/7VEGnSRhtmVL/7uIT/GdFtBjNQ8r4pLUOG+78Ltu8FA OHifmCgEyWoLPCV5YGB1YS9iTQ== 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 X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, 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:23:06 -0000 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.