Futex2 Proposed In Latest Effort For Linux Kernel Optimization That Can Benefit Gamers

Written by Michael Larabel in Valve on 12 June 2020 at 03:25 PM EDT. 63 Comments
VALVE
Last year Valve in cooperation with consulting firm Collabora published their work on extending the futex system call for more optimal thread pool synchronization with a means of waiting on any of several futexes. This kernel-level work paired with patched user-space for Wine/Proton allows better matching behavior on Windows. It's been months since hearing anything on Valve's futex effort while today a futex2 system call was published for discussion.

The futex patches posted last year could help with Linux gaming CPU utilization in the patched implementation leading to lower CPU utilization than an eventfd-based approach currently employed by Wine. This kernel improvement can mean lower CPU utilization and also avoids the possibility of exhausting available file descriptors.

While that original work was about extending futex, the new patches out today from Collabora are introducing a new futex2() system call.

Futex2 allows for waiting on any of several futexes and to better support other features moving forward instead of trying to fit them into the existing futex system call without breaking the interface. Among the possibilities are variable bit size futexes and NUMA optimizations.

The "request for comments" on the new futex2 patches can be found via this lore thread.

The work is obviously too late for seeing it come in Linux 5.8 but if the discussions go well perhaps we'll see the initial implementation in Linux 5.9 later this year.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week