Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp6627842ybi; Wed, 31 Jul 2019 18:17:17 -0700 (PDT) X-Google-Smtp-Source: APXvYqzu08o7MXl1GBsQZj7JtFAYwQb5meevBmINwb3M5x7Te0BV7FiH0b/qeokDS5OdKmbpxk1B X-Received: by 2002:a17:90a:bb01:: with SMTP id u1mr5590784pjr.92.1564622237764; Wed, 31 Jul 2019 18:17:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564622237; cv=none; d=google.com; s=arc-20160816; b=dzvzqzFnT9pkTRPty7tTy42q9kCp88uUYSIo78I3Ym83xOA+SMWpK6qKtz+ej2NcbG 0tEO/lZloiWzj1GZj5wL6RD9ilbtXi332k6n4Lq83DovJuLOfHEvYBrIsjXoZU3GdWng /Du83qErsRM4AYIsT47a3t148x/j0/yKM4eSPpyx6Qautsqqz97ifcAOq7qxwPCDUQ7s m94YTgHMw6uPphYRIElLHfAQvd6w9etra0iWKKi0h0U+t6nIPlxH8fhqxN6lpqQUmOzZ gQXPoM8QjbIVrQcWP5tZrpttKTblEvv7Cixj18DttPk7tf8e80UTmQVUcH50fUecQu32 6+SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=/5R/vUVIzLlRLP/QnD+twXXWfknmzmEADQDoT++6TN4=; b=nvHfuigdmFf6mGja8zOHGEBm+TvT8MOOKuOviSpZmdYKPEbf6Z6UEb2eIa4ph+G6Bi v9rBudl5QzbyyN3TwchLMQQSxsbL7UMe0dIgG40ZOvDCMjgV4L5fkNRsK0ztsb2eRPD4 hJLRIOFgauCFp3dbnturYaOsglUkWVGSM/pJiVBB/XHfsTxHnnaWsQ7ltdR7+02TKuHt U7L4X2lzqyM/G++X0BkdtYVNcVqmCZjEMZgxOL1xtBk1IY8pMGYw5sKwZxy49XOZmpx+ FBEMRmxlIbpWBTWaCTnbEmNYkWrb3iNDutk5snxjvGJe/iR32bip9zx7og4IIeGDuzlq vbbQ== 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 124si36004886pgg.581.2019.07.31.18.16.49; Wed, 31 Jul 2019 18:17:17 -0700 (PDT) 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 S1727833AbfGaWjU (ORCPT + 99 others); Wed, 31 Jul 2019 18:39:20 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:33338 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726224AbfGaWjT (ORCPT ); Wed, 31 Jul 2019 18:39:19 -0400 Received: from pd9ef1cb8.dip0.t-ipconnect.de ([217.239.28.184] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1hsxFX-0000Hx-Ig; Thu, 01 Aug 2019 00:39:12 +0200 Date: Thu, 1 Aug 2019 00:39:10 +0200 (CEST) From: Thomas Gleixner To: Zebediah Figura cc: Peter Zijlstra , Gabriel Krisman Bertazi , mingo@redhat.com, dvhart@infradead.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Steven Noonan , "Pierre-Loup A . Griffais" , viro@zeniv.linux.org.uk, jannh@google.com Subject: Re: [PATCH RFC 2/2] futex: Implement mechanism to wait on any of several futexes In-Reply-To: <306b3332-0065-59dc-e6d6-ee3c8a67ef53@gmail.com> Message-ID: References: <20190730220602.28781-1-krisman@collabora.com> <20190730220602.28781-2-krisman@collabora.com> <20190731120600.GT31381@hirez.programming.kicks-ass.net> <306b3332-0065-59dc-e6d6-ee3c8a67ef53@gmail.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII 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 On Wed, 31 Jul 2019, Zebediah Figura wrote: > On 7/31/19 7:06 AM, Peter Zijlstra wrote: > > On Tue, Jul 30, 2019 at 06:06:02PM -0400, Gabriel Krisman Bertazi wrote: > > > This is a new futex operation, called FUTEX_WAIT_MULTIPLE, which allows > > > a thread to wait on several futexes at the same time, and be awoken by > > > any of them. In a sense, it implements one of the features that was > > > supported by pooling on the old FUTEX_FD interface. > > > > > > My use case for this operation lies in Wine, where we want to implement > > > a similar interface available in Windows, used mainly for event > > > handling. The wine folks have an implementation that uses eventfd, but > > > it suffers from FD exhaustion (I was told they have application that go > > > to the order of multi-milion FDs), and higher CPU utilization. > > > > So is multi-million the range we expect for @count ? > > > > Not in Wine's case; in fact Wine has a hard limit of 64 synchronization > primitives that can be waited on at once (which, with the current user-side > code, translates into 65 futexes). The exhaustion just had to do with the > number of primitives created; some programs seem to leak them badly. And how is the futex approach better suited to 'fix' resource leaks? Thanks, tglx