In brief: Valve is proposing changes to the Linux kernel to make it more game-friendly. Specifically, it is looking to extend futex() (fast user-space locking) functionality, and modifications to glibc and lbpthread to improve multi-thread operations.
Valve has long supported the idea of improving the capabilities of Linux when it comes to PC gaming. Its recent efforts began with the ill-fated Steam Machine, which ran on the Linux-based SteamOS. It also made efforts to improve the open-source Windows compatibility layer Wine.
The problem with Wine is that it struggles with more hardware-demanding programs. Valve attacked this challenge by launching a beta version of Steam Play that includes Proton --- a game-friendly build of Wine. While this did help some, there were still many issues with performance.
In the most recent build of Proton's patch notes, Valve proposes changes to the Linux kernel to overcome problems it saw while trying to run some games.
To begin with, it has an experimental replacement for esync called fsync which provides "support for futex-based in-process synchronization primitives" and reduces CPU usage more than esync. However, because it requires the use of the kernel's eventfd() function, it needs modifications to the Linux kernel to work correctly.
"We're proposing changes to the Linux kernel [lkml.org] to extend the futex() system call to expose what we think is the needed extra bit of core functionality needed to support optimal thread pool synchronization."
These changes would primarily extend futex() functionality to establish optimal thread pool synchronization. Proton 4.11 will have the fsync patch to utilize the new kernel when supported.
Developers are also proposing changes to glibc and libpthread.
"We are also proposing modifications to glibc and libpthread to make this feature available for Linux native multithreaded applications using libpthread, which can benefit from the behavior of waiting on any of a group of futexes," Gabriel Krisman Bertazi, a software engineer for Collabora said in a discussion thread on LKML.
Bertazi went on to say that futexes in early testing saw performance improvements of 4 percent for the game Beat Saber and 1.5 percent for Shadow of the Tomb Raider while running on Proton.
The Linux community is welcoming the patch, although it needs to be cleaned up a bit to meet current coding standards.
Valve has posted "proof-of-concept" glibc patches for review. It believes these changes will significantly improve game functionality on Linux.
"We would achieve efficiency gains by adopting it in native massively-threaded applications such as Steam and the Source 2 engine," Valve said.
If you are interested in trying out the beta, Valve has posted packages for both Arch and Ubuntu Linux.
Image credit: Casimiro PT via Shutterstock