Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4135664pxj; Tue, 8 Jun 2021 07:17:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWLSRtf1BJFTHYSnt7W/aAtrbs2IBYkt73u50YoxzhipmmYAdUvrNpZmzue50ZIMD8NSFa X-Received: by 2002:a17:906:17d8:: with SMTP id u24mr24163728eje.106.1623161859020; Tue, 08 Jun 2021 07:17:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623161859; cv=none; d=google.com; s=arc-20160816; b=0QscSJFqEwiDO86PVu7DZLUb90Sew+MvBJ7X3B5u/iiyfjWg7N87hVBKOuPPkfYIAB /e+xMUzA04iJNe+9JiWnkL6HMh1+pNnJy3jsvLGhS3q4x2Wj0imlH5L+vlBkw2uzmuxG 4VCSRyTGYiRwBufVCpWIQ09kKZiMpNfarzSLjUV6Ns8wOyYZ3wC3pcShob1e4g9TMr9Y R91Gu+pwp9MNrsy9xytDXvZB1AV8EBp+HiayBsPAdRw2wGqFMsHDmKUGwiM2Xt7u7Oon 6uamfnC+CtRfRiwkGSM/kF0q8Dtr1qI+tBVLDqrBvN2JQb4EyBslKjMh/HxiDbBh9Tau TEzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=erp6vVfjmsnZpL6Z607+m65ZM0VyVX/yBedOcDccqlk=; b=sjg3NVM0OYTHnu98PRhY0VOKDkCzHH5dbAbMdSW7JVwnZOfpNqSz89ub1svl//Zcb5 Ml0gB0+NoO9LJ93pBBM85zaktZnaZxzaleKxmj37pR39uDWj1CJEW5wxZRwkOaD170Yy p/wWyUq5KgsmOGhaizxAMoCTOQ5M06EV5hpL/ct/ec6gP26xs3cl7uIRTK/H90SvU3w9 6lspeTGjwJ6/ukFS3CfdnYKK3eVJJa1YBbuE03TclUbKVL5qiFnEUrrzvX4OMP5KhpcF ReIBLKAn502M8fAMoz/PjMW646L8CiFbQqrJ1cpPev2c9EJ8onnHESelDhTApDHxNBVN WG1Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kd26si15620383ejc.672.2021.06.08.07.17.14; Tue, 08 Jun 2021 07:17:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233222AbhFHOQr (ORCPT + 99 others); Tue, 8 Jun 2021 10:16:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233158AbhFHOQr (ORCPT ); Tue, 8 Jun 2021 10:16:47 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CAC9C061574; Tue, 8 Jun 2021 07:14:54 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: tonyk) with ESMTPSA id 4ABA81F42B4F Subject: Re: [PATCH v4 00/15] Add futex2 syscalls To: Greg KH , Peter Zijlstra Cc: Nicholas Piggin , acme@kernel.org, Sebastian Andrzej Siewior , corbet@lwn.net, Andrey Semashev , Davidlohr Bueso , Darren Hart , fweimer@redhat.com, joel@joelfernandes.org, kernel@collabora.com, krisman@collabora.com, libc-alpha@sourceware.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, malteskarupke@fastmail.fm, Ingo Molnar , pgriffais@valvesoftware.com, Peter Oskolkov , Steven Rostedt , shuah@kernel.org, Thomas Gleixner , z.figura12@gmail.com References: <20210603195924.361327-1-andrealmeid@collabora.com> <1622799088.hsuspipe84.astroid@bobo.none> <1622853816.mokf23xgnt.astroid@bobo.none> <6d8e3bb4-0cef-b991-9a16-1f03d10f131d@gmail.com> <1622980258.cfsuodze38.astroid@bobo.none> <1623114630.pc8fq7r5y9.astroid@bobo.none> From: =?UTF-8?Q?Andr=c3=a9_Almeida?= Message-ID: <1983f58b-6bb2-5f47-3cb2-647bb81b6ed2@collabora.com> Date: Tue, 8 Jun 2021 11:14:41 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: 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 Hi Greg, Às 08:13 de 08/06/21, Greg KH escreveu: > On Tue, Jun 08, 2021 at 02:03:50PM +0300, Andrey Semashev wrote: >> On 6/8/21 4:25 AM, Nicholas Piggin wrote: >>> >>> Are shared pthread mutexes using existing pthread APIs that are today >>> implemented okay with futex1 system call a good reason to constrain >>> futex2 I wonder? Or do we have an opportunity to make a bigger change >>> to the API so it suffers less from non deterministic latency (for >>> example)? >> >> If futex2 is not able to cover futex1 use cases then it cannot be viewed as >> a replacement. In the long term this means futex1 cannot be deprecated and >> has to be maintained. My impression was that futex1 was basically >> unmaintainable(*) and futex2 was an evolution of futex1 so that users of >> futex1 could migrate relatively easily and futex1 eventually removed. Maybe >> my impression was wrong, but I would like to see futex2 as a replacement and >> extension of futex1, so the latter can be deprecated at some point. > > You can never delete a kernel system call, so even if you "deprecate" > it, it still needs to be supported for forever. > > Best of all would be if internally your "futex2" code would replace the > "futex1" code so that there is no two different code bases. That would > be the only sane way forward, having 2 code bases to work with is just > insane. > >> (*) I use "unmaintainable" in a broad sense here. It exists and works in >> newer kernel versions and may receive code changes that are necessary to >> keep it working, but maintainers refuse any extensions or modifications of >> the code, mostly because of its complexity. > > Adding additional complexity for no good reason is not a good idea, > especially if you are asking others to maintain and support that > complexity. Would you want to have to do that work? > > So what's keeping the futex2 code from doing all that futex1 does so > that the futex1 code can be deleted internally? > My very first submission of futex2[0] was just an overlay on top of futex.c, I didn't get much feedback at that time, but I think this is what you and Peter are thinking of? After that, last year at Plumbers' RT MC, I presented a talk called "futex2: A New Interface" and my conclusion after the discussion on this talk + responses I got from my FUTEX_WAIT_MULTIPLE patchset[1] was that this work couldn't be done at futex.c, given how fragile things are there. futex.c would be "feature freeze" and no new major changes would happen there. This is the context where this new futex2 code base comes from. So, which one is it? Happy to go either way but I'm getting conflicting messages here. Thanks, André [0] https://lore.kernel.org/lkml/20200612185122.327860-2-andrealmeid@collabora.com/ [1] https://lore.kernel.org/lkml/20200213214525.183689-1-andrealmeid@collabora.com/ > thanks, > > greg k-h >