Futex2 Proposed In Latest Effort For Linux Kernel Optimization That Can Benefit Gamers
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.
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.
63 Comments