All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zebediah Figura <z.figura12@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: tglx@linutronix.de, mingo@redhat.com, dvhart@infradead.org,
	linux-kernel@vger.kernel.org, kernel@collabora.com,
	Steven Noonan <steven@valvesoftware.com>,
	"Pierre-Loup A . Griffais" <pgriffais@valvesoftware.com>,
	viro@zeniv.linux.org.uk, jannh@google.com
Subject: Re: [PATCH RFC 2/2] futex: Implement mechanism to wait on any of several futexes
Date: Wed, 31 Jul 2019 10:15:49 -0500	[thread overview]
Message-ID: <306b3332-0065-59dc-e6d6-ee3c8a67ef53@gmail.com> (raw)
In-Reply-To: <20190731120600.GT31381@hirez.programming.kicks-ass.net>

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.

  reply	other threads:[~2019-07-31 15:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 22:06 [PATCH RFC 1/2] futex: Split key setup from key queue locking and read Gabriel Krisman Bertazi
2019-07-30 22:06 ` [PATCH RFC 2/2] futex: Implement mechanism to wait on any of several futexes Gabriel Krisman Bertazi
2019-07-31 12:06   ` Peter Zijlstra
2019-07-31 15:15     ` Zebediah Figura [this message]
2019-07-31 22:39       ` Thomas Gleixner
2019-07-31 23:02         ` Zebediah Figura
2019-08-06  6:26     ` Gabriel Krisman Bertazi
2019-08-06 10:13       ` Peter Zijlstra
2019-08-01  0:45   ` Thomas Gleixner
2019-08-01  1:22     ` Zebediah Figura
2019-08-01  1:32       ` Zebediah Figura
2019-08-01  1:42         ` Pierre-Loup A. Griffais
2019-07-31 23:33 ` [PATCH RFC 1/2] futex: Split key setup from key queue locking and read Thomas Gleixner
2019-08-01  0:07   ` Gabriel Krisman Bertazi
2019-08-01  0:22     ` Gabriel Krisman Bertazi
2019-08-01  0:41     ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=306b3332-0065-59dc-e6d6-ee3c8a67ef53@gmail.com \
    --to=z.figura12@gmail.com \
    --cc=dvhart@infradead.org \
    --cc=jannh@google.com \
    --cc=kernel@collabora.com \
    --cc=krisman@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pgriffais@valvesoftware.com \
    --cc=steven@valvesoftware.com \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.