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.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,UNPARSEABLE_RELAY,URIBL_BLOCKED,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 713BAC432BE for ; Wed, 18 Aug 2021 16:34:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 51DF6610A6 for ; Wed, 18 Aug 2021 16:34:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231223AbhHRQew (ORCPT ); Wed, 18 Aug 2021 12:34:52 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:42476 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232979AbhHRQen (ORCPT ); Wed, 18 Aug 2021 12:34:43 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tonyk) with ESMTPSA id 744841F433CA Subject: Re: [PATCH 2/4] futex2: Implement vectorized wait To: Peter Zijlstra , Thomas Gleixner Cc: Ingo Molnar , Darren Hart , linux-kernel@vger.kernel.org, Steven Rostedt , Sebastian Andrzej Siewior , kernel@collabora.com, krisman@collabora.com, linux-api@vger.kernel.org, libc-alpha@sourceware.org, mtk.manpages@gmail.com, Davidlohr Bueso References: <20210805190405.59110-1-andrealmeid@collabora.com> <20210805190405.59110-3-andrealmeid@collabora.com> <87v94310gm.ffs@tglx> <20210818162034.GA26408@worktop.programming.kicks-ass.net> From: =?UTF-8?Q?Andr=c3=a9_Almeida?= Message-ID: <42c6c37d-dd35-e797-9194-4619c1456f85@collabora.com> Date: Wed, 18 Aug 2021 13:34:00 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210818162034.GA26408@worktop.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Às 13:20 de 18/08/21, Peter Zijlstra escreveu: > On Wed, Aug 18, 2021 at 01:00:57PM +0200, Thomas Gleixner wrote: >>> +/** >>> + * struct futex_waitv - A waiter for vectorized wait >>> + * @val: Expected value at uaddr >>> + * @uaddr: User address to wait on >>> + * @flags: Flags for this waiter >>> + */ >>> +struct futex_waitv { >>> + __u64 val; >> >> Again. Why u64? > > So I think the idea was that if we're going to do new syscalls, we > should cater for future extentions, one of which was 64bit futexes (for > 64bit archs) (along with u{8,16,32}) > > The previous set of patches implemented a more complete replacement ABI > -- which I rather liked, however the implementation was completely > disjoint from the existing futexes, which was a non-starter for me. > > Anyway, yes, current futexes are u32, but if we want to ever do u64 > futexes, we should either do this syscall with a u64, or already plan to > retire the whole syscall. > > Obiously this would've made good Changelog material, but alas it wasn't > there. > Ops, I forgot to add the reasoning behind the 64 futexes. The idea is that futex users want to be able to properly do 64bit atomic operations on top of futex values: [0] https://lore.kernel.org/lkml/CAFTs51XAr2b3DmcSM4=qeU5cNuh0mTxUbhG66U6bc63YYzkzYA@mail.gmail.com/ [1] https://lore.kernel.org/lkml/20210603195924.361327-1-andrealmeid@collabora.com/T/#m37bfbbd6ac76c121941defd1daea774389552674 [2] https://lists.boost.org/Archives/boost/2021/05/251508.php