Thread (50 messages) 50 messages, 11 authors, 2021-06-09

Re: [PATCH v4 00/15] Add futex2 syscalls

From: Zebediah Figura <hidden>
Date: 2021-06-04 04:52:55
Also in: linux-kselftest, lkml

On 6/3/21 2:59 PM, André Almeida wrote:
  ** The wait on multiple problem

  The use case lies in the Wine implementation of the Windows NT interface
  WaitMultipleObjects. This Windows API function allows a thread to sleep
  waiting on the first of a set of event sources (mutexes, timers, signal,
  console input, etc) to signal.  Considering this is a primitive
  synchronization operation for Windows applications, being able to quickly
  signal events on the producer side, and quickly go to sleep on the
  consumer side is essential for good performance of those running over Wine.
I know this is part of the cover letter, but I really do want to clarify 
that this isn't really accurate. The use case that this is referring to 
is not "the Wine implementation of WaitForMultipleObjects", it is an 
out-of-tree implementation of WaitForMultipleObjects that provides 
improved performance compared to the in-tree implementation.

This is especially salient because:

(1) this out-of-tree implementation is only in a small handful of cases 
any more performant than a different out-of-tree implementation which 
uses eventfd and poll() instead;

(2) these implementations will remain out-of-tree due to compatibility 
and robustness problems;

(3) I believe there is potential for an upstreamable implementation 
which does not rely on futex or futex2.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help