It seems the ongoing saga of getting the futex2 work into the Linux Kernel, which is supposed to help Linux gaming and Steam Play Proton, has another attempt up. This is a continuation of the cut-down and more focused code that was submitted back in early August, as Collabora hope to finally get it accepted into the Kernel.
The key point is that this code is not just to help Windows games on Linux through Proton but to also help native games. While the code better matches behaviour found on Windows, anything that needs it can benefit. As developer André Almeida explains:
"The use case of this syscall is to allow low level locking libraries to wait for multiple locks at the same time. This is specially useful for emulating Windows' WaitForMultipleObjects. A futex_waitv()-based solution has been used for some time at Proton's Wine (a compatibility layer to run Windows games on Linux). Compared to a solution that uses eventfd(), futex was able to reduce CPU utilization for games, and even increase frames per second for some games. This happens because eventfd doesn't scale very well for a huge number of read, write and poll calls compared to futex. Native game engines will benefit of this as well, given that this wait pattern is common for games."
Since we last wrote about it, two new versions of it have been sent in so it's now on the third iteration with these changes and improvements:
Changes from v2:
- Last version, I made compat and non-compat use the same code, but
failed to remove the compat entry point. This is fixed now.
- Add ARM support
Changes from v1:
- Tons of code and comment improvements and fixes (thanks Thomas!)
- Changed the struct to have explicit padding (thanks Arnd!)
- Created a kernel/futex.h
- Splitted syscall table changes from the implementation
- Compat and non-compat entry point now uses the same code and same
- Added test for timeout
You can see the patches on the Linux Kernel mailing list.