FUTEX2’s ongoing work to make futex management more Windows-like to in turn help Windows games on Linux through Wine (with a focus on Steam Play’s Proton) has taken a new turn.
While the FUTEX2 patch set has gone through multiple review cycles to add new functionality that cannot be accomplished as well by the existing FUTEX, the patch set has been reduced to the core functionality that motivated Originally this work: the ability to wait for multiple locks at once, similar to Windows’ WaitForMultipleObjects. This ability to cleanly wait for multiple locks simultaneously can reduce CPU usage for Windows games run through Proton / Wine and improve the overall performance of some games. On the kernel side, this can be accomplished with the futex_waitv () system call (vectorized futex wait).
Previous versions of the FUTEX2 patches also added support for variable-size futexes in a powerful way, NUMA support, and other improvements. But now, focusing only on the new system call, the patch set is lighter for review and therefore will hopefully be reviewed and picked up for integration more easily. Additional fixes can always be added later.
More details on this lighter tweak of the FUTEX2 patches can now be viewed via this kernel mailing list thread. Now we’ll see if this can be merged into the mainline earlier, potentially as early as Linux 5.15.