Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp238967ybf; Sat, 29 Feb 2020 02:30:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyoRwY9p06ooEJV5E/pmpMS5lLX+xWaXaiJddCNBMyTaxmHsMuQ51G/neYuKACg+eMPStmD X-Received: by 2002:aca:e146:: with SMTP id y67mr5656054oig.93.1582972222998; Sat, 29 Feb 2020 02:30:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582972222; cv=none; d=google.com; s=arc-20160816; b=EyZQdj94qFB+gIGq3m1yzMqWDsJ1YKQ5hgc5udL8lQMsL0KLz4emNRvthzdiehOK7j ZKHmf0xJLfgvRGcfglA9WwZbditCMef+nIKvh7Z+ROsqhiKIhcaFoBs/okP4XXSLI/p6 AktPJP688FELiYl33aQDcpcHGvroNxuT0r+/qvLrecN9UI36JtCi4pTK+AqEsi5wjXzW UUS8dQBAzoorbo3WY3D/8cVQgF1ex01soxjKsMCUW+sLFF8uDMCu9MOzvjiEN3aHxrby 6MlsYsclxG4gb/KBw7DxUv8q9cFkU5M4za5WvLduEzUj4A+iH/+d/WZJ6lvb2DshOclp HTmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=AkVN4PcuBIgRm3zaN35DIthqeyTyVCBjbNdnJNjtPoU=; b=jobyTvXmxjI7IINfvEwrNB5O7ZzRFSBJgLoU9suaBdFoMAR/YxRk1coaqm1JQQC/bo MJnz0cDGAnph5gWHpiLn6C+LwDw4l0DRQ6YcHjS8uR0VMf3TN5ixvtGP3iiWQleOeXYF jisU45gcxvkfL/qgYSDmao1IB6QHN3w/UrEExFDOKP2QUYZ6jw13RdcrqIDNotg0YXmo LyxY5rZtrtQ26Zx3Ob3iaHLoenH8WUx8ituCzXw9LtHb+vU2MkCoINiFy92Z5XY3Y4T5 84maGlSrUO2agBwB2wqFqRTyzea+o/8BaX61Bbw3y8GXw/55pvGLAzqJJcswmSJbMI95 ToOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p19si3079464otq.296.2020.02.29.02.29.52; Sat, 29 Feb 2020 02:30:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726867AbgB2K15 (ORCPT + 99 others); Sat, 29 Feb 2020 05:27:57 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:38986 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726671AbgB2K14 (ORCPT ); Sat, 29 Feb 2020 05:27:56 -0500 Received: from p5de0bf0b.dip0.t-ipconnect.de ([93.224.191.11] helo=nanos.tec.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1j7zLG-0006lS-TX; Sat, 29 Feb 2020 11:27:31 +0100 Received: by nanos.tec.linutronix.de (Postfix, from userid 1000) id 14CCF1012C4; Sat, 29 Feb 2020 11:27:30 +0100 (CET) From: Thomas Gleixner To: "Pierre-Loup A. Griffais" , Peter Zijlstra , =?utf-8?Q?Andr=C3=A9?= Almeida Cc: linux-kernel@vger.kernel.org, kernel@collabora.com, krisman@collabora.com, shuah@kernel.org, linux-kselftest@vger.kernel.org, rostedt@goodmis.org, ryao@gentoo.org, dvhart@infradead.org, mingo@redhat.com, z.figura12@gmail.com, steven@valvesoftware.com, steven@liquorix.net, malteskarupke@web.de Subject: Re: [PATCH v3 1/4] futex: Implement mechanism to wait on any of several futexes In-Reply-To: <967d5047-2cb6-d6d8-6107-edb99a4c9696@valvesoftware.com> References: <20200213214525.183689-1-andrealmeid@collabora.com> <20200213214525.183689-2-andrealmeid@collabora.com> <20200228190717.GM18400@hirez.programming.kicks-ass.net> <20200228194958.GO14946@hirez.programming.kicks-ass.net> <87tv3aflqm.fsf@nanos.tec.linutronix.de> <967d5047-2cb6-d6d8-6107-edb99a4c9696@valvesoftware.com> Date: Sat, 29 Feb 2020 11:27:30 +0100 Message-ID: <87o8thg031.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Pierre-Loup A. Griffais" writes: > On 2/28/20 1:25 PM, Thomas Gleixner wrote: >> Peter Zijlstra writes: >>> Thomas mentioned something like that, the problem is, ofcourse, that we >>> then want to fix a whole bunch of historical ills, and the probmem >>> becomes much bigger. >> >> We keep piling features on top of an interface and mechanism which is >> fragile as hell and horrible to maintain. Adding vectoring, multi size >> and whatever is not making it any better. >> >> There is also the long standing issue with NUMA, which we can't address >> with the current pile at all. >> >> So I'm really advocating that all involved parties sit down ASAP and >> hash out a new and less convoluted mechanism where all the magic new >> features can be addressed in a sane way so that the 'F' in Futex really >> only means Fast and not some other word starting with 'F'. > > Are you specifically talking about the interface, or the mechanism > itself? Would you be OK with a new syscall that calls into the same code > as this patch? It does seem like that's what we want, so if we rewrote a > mechanism I'm not convinced it would come out any different. But, the > interface itself seems fair-game to rewrite, as the current futex > syscall is turning into an ioctl of sorts. No, you are misreading what I said. How does a new syscall make any difference? It still adds new crap to a maze which is already in a state of dubious maintainability. > This solves a real problem with a real usecase; so I'd like to stay > practical and not go into deeper issues like solving NUMA support for > all of futex in the interest of users waiting at the other end. Can you > point us to your preferred approach just for the scope of what we're > trying to accomplish? If we go by the argument that something solves a real use case and take this as justification to proliferate existing crap, then we never get to the point where things get redesigned from ground up. Quite the contrary, we are going to duct tape it to death. It does not matter at all whether the syscall is multiplexing or split up into 5 different ones. That's a pure cosmetic exercise. While all the currently proposed extensions (multiple wait, variable size) make sense conceptually, I'm really uncomfortable to just cram them into the existing code. They create an ABI which we have to maintain forever. From experience I just know that every time we extended the futex interface we opened another can of worms which hunted us for years if not for more then a decade. Guess who has to deal with that. Surely not the people who drive by and solve their real world usecases. Just go and read the changelog history of futexes very carefully and you might understand what kind of complex beasts they are. At some point we simply have to say stop, sit down and figure out which kind of functionality we really need in order to solve real world user space problems and which of the gazillion futex (mis)features are just there as historical ballast and do not have to be supported in a new implementation, REQUEUE is just the most obvious example. I completely understand that you want to stay practical and just want to solve your particular itch, but please understand that the people who have to deal with the fallout and have dealt with it for 15+ years have very practical reasons to say no. Thanks, tglx