NUMA interface for FUTEX2 is still discussed for Linux

Merged last year for the Linux 5.16 cycle, the futex_waitv() system call from FUTEX2 to wait for multiple futexes to better match Microsoft Windows behavior. This FUTEX2 initiative was conducted with the aim of further improving the performance/efficiency of Linux games, especially for Valve’s Steam game. Originally there were other goals with FUTEX2 and now we see another one we are working on: NUMA awareness.

In order to be integrated earlier, FUTEX2 went for a simple initial push with futex_waitv and removed some of the extras like NUMA awareness and variable size futexes from the initial merge plans. But in the months since futex_waitv() was merged and a few kernel cycles since, there has been no rush to complete the remaining features of FUTEX2.

Last July, André Almeida from Igalia started looking into NUMA awareness support for FUTEX2, then this week presented it at the Linux Plumbers Conference. This NUMA awareness is intended to overcome the current FUTEX flaw that the entire kernel space memory hashtable resides in a single memory node and incurs additional latency for each FUTEX operation that occurs outside of the node where the hash table is located.

The proposed addition is to be able to add a NUMA index if it should reside in the current node, otherwise it can specify a particular node.

Those interested in learning more about NUMA’s outreach effort for FUTEX2 can check out André Almeida’s article slide deck of LPC 2022 and/or the LKML of July describing the same proposed interface.