Every article tag can be clicked to get a list of all articles in that category. Every article tag also has an RSS feed! You can customize an RSS feed too!
We do often include affiliate links to earn us some pennies. See more here.

After attempting for some time now to get their futex2 work into the Linux Kernel, Collabora have cut it all down to focus on one part that has seen thorough testing to help Windows games on Linux with Steam Play Proton.

The work, funded by Valve, is to help Windows game compatibility when they're run through Wine and Steam Play Proton to ensure they actually work and perform well. The current implementations in the Linux Kernel aren't ideal and so they've tried rewriting them. Now they're focusing on adding one specific syscall with "futex_waitv()" so that they "can focus on this operation that already have a well defined use case and has been tested for months now".

Something to note is that this doesn't just benefit games run through compatibility layers, it will also help native games too but obviously with what Valve is doing with the Steam Deck and Proton the focus has been largely on that. In the patches developer André Almeida explained the use case for it as:

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.

If you're interested in the full details you can see the mailing list entry.

Article taken from GamingOnLinux.com.
30 Likes
About the author -
author picture
I am the owner of GamingOnLinux. After discovering Linux back in the days of Mandrake in 2003, I constantly checked on the progress of Linux until Ubuntu appeared on the scene and it helped me to really love it. You can reach me easily by emailing GamingOnLinux directly. You can also follow my personal adventures on Bluesky.
See more from me
The comments on this article are closed.
All posts need to follow our rules. For users logged in: please hit the Report Flag icon on any post that breaks the rules or contains illegal / harmful content. Guest readers can email us for any issues.
4 comments

lejimster Aug 11, 2021
Has any of this Futex stuff ever made it upstream? It seems like every year there is some attempt, but it never makes its way into the Kernel.
CatKiller Aug 11, 2021
View PC info
  • Supporter Plus
Has any of this Futex stuff ever made it upstream? It seems like every year there is some attempt, but it never makes its way into the Kernel.
The kernel cadence is a new version every two months, so more often than that 😝

I can see their point that they want to get their use case sorted for their use case, particularly before December, and they don't want to be bogged down by the kitchen sink nice-to-have stuff that people want, but I hope the design of the changes that get made doesn't prevent the kitchen sink stuff in the future. We don't want to have to have a futex3.
TheRiddick Aug 11, 2021
Think I've been using this with xanmod kernel for a couple weeks now. Had a bumpy start but all seems to work now, I think.
F.Ultra Aug 12, 2021
View PC info
  • Supporter
Has any of this Futex stuff ever made it upstream? It seems like every year there is some attempt, but it never makes its way into the Kernel.

Yeah zero of them have been accepted so far, this one is very small and nonintrusive though so I'm holding my thumbs.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
The comments on this article are closed.