FUTEX2 Begins Sorting Out NUMA Awareness

Written by Michael Larabel in Linux Kernel on 14 July 2022 at 04:56 AM EDT. 2 Comments
LINUX KERNEL
Merged last year for Linux 5.16 was the FUTEX2 system call for improving the FUTEX interface on Linux and with the original motivation for those improvements to wait on multiple futexes so Wine/Proton can better match Microsoft Windows' behavior for a more optimal Linux gaming experience. Beyond the performance/efficiency benefit of FUTEX2, other improvements have also been talked about while we are now beginning to see action on one of them: NUMA awareness.

The main focus on the original FUTEX2 work was with "futex_waitv" to address the needs of Wine/Proton by better matching Windows' WaitForMultipleObjects behavior with more efficient emulation. Going back to the patch review times, other FUTEX2 features talked about were variable-sized futexes, NUMA awareness, and other enhancements over the original FUTEX interface. Sent out today by André Almeida of Igalia was a request for comments on the NUMA awareness aspect for FUTEX2.

André Almeida summed it up as:
* The problem

futex has a single, global hash table to store information of current waiters to be queried by wakers. This hash table is stored in a single node in non-uniform machines. This means that a process running in other nodes will have some overhead using futex, given that it will need to access the table in a different node.

* A solution

For NUMA machines, it would be allocated a table per node. Processes then would be able to use the local table to avoid sharing data with other nodes.

Almeida has proposed an interface for FUTEX2 to deal with this NUMA awareness aspect. Currently he is looking for comments/feedback from upstream developers on the design to see if it's something worthwhile to move forward.
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