FUTEX2 Begins Sorting Out 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.