Futex2/FUTEX_WAIT_MULTIPLE missing in 5.15.11-1 testing but patch enabled in PKGBUILD

I always wait until the next kernel has fsync patches enabled and today I noticed the patch is up in 5.15

So I switched from 5.14

Linux 80yy 5.15.11-1-MANJARO #1 SMP PREEMPT Wed Dec 22 09:39:38 UTC 2021 x86_64 GNU/Linux

Though, after running either my script to detect WAIT_MULTIPLE or someone else’s more elaborate script that detects both futex2 and WAIT I am getting nothing is enabled at all. It worked alright and reported enabled for 5.14.

Is the patched kernel not in testing repo yet (how does one verify that?) or did some syscall ids changed so the scripts are now stale (I am guessing here, I am compiling it locally so this should not really happen) ?

Used scripts

EDIT: I have updated my fsynctest script to respect what we found here

Futex (wait multiple) is enabled and working in Kernel 5.15 since it came out. Futex2 is available in 5.16 as it has been merged upstream.

To test it simply run steam from a terminal, start a Proton game and check the output for:

fsync: up and running.

In case the Kernel has no Futex patch, the output would be:

esync: up and running.

Just tried.
Started steam and redirected all output to file (zsh, steam &> steam.log) and started proton game (Noita).

> egrep -i 'esync|fsync' steam.log
esync: up and running.

And checking

> uname -a
Linux 80yy 5.15.11-1-MANJARO #1 SMP PREEMPT Wed Dec 22 09:39:38 UTC 2021 x86_64 GNU/Linux

So with that, it seems my 5.15.11 does not have the futex_wait_multiple enabled, though as you say it should?

This is weird indeed, yes it should work as i also just tried it to verify.
I ran 2 games, both with the same result:

steam &> steam.log

egrep -i 'esync|fsync' steam.log
fsync: up and running.
fsync: up and running.

uname -r                                                         ✔ 
5.15.11-1-MANJARO

What Proton version are you using?
Do you get a different result with Kernel 5.14 or 5.16?

I did run the game with Proton-6.14-GE-2.
Running with no forced compatibility tool successfully prints

> egrep -i 'esync|fsync' steam.log
fsync: up and running.
fsync: up and running.

This seems to be Proton 6.3 .
I didn’t hop back to 5.14 but I was using it for some months and basically I am sure that even in some Lutris games that fsync: up and running. did pop up as well as passed the script checks.
I will try 5.16

So the futex patch is enabled, now what’s weird is that one version of Proton did not detect it and neither did custom scripts where the my script is using code directly from Proton itself to detect fsync.

Merged upstream means this patch PKGBUILD · master · Packages / Core / linux516 · GitLab is no longer required? so it’s not an indicator of if fsync is enabled or not anymore?

The patch is uncommented/disabled in the PKGBUILD and no longer needed, so it can be removed (cleaned up) that’s right.

My guess is that the code of Futex and Futex2 has changed after this old Proton-6.14-GE-2. release, as it does work with current Proton releases.
Are those tools able to detect Futex2 on Kernel 5.16 and does Proton-6.14-GE-2. work with fsync on 5.16 or 5.14?

Yeah I think this is it, I am looking into the proton code for futex detection right now and I can already see that the interface has changed. So older Proton versions and tools will now not detect and enable this new fsync.

The PKGBUILD of Kernel 5.16 has been cleaned up, thanks for the hint!

As this functionality is now built into the mainline Kernel starting with 5.16, I do not see the need any more to detect it with 3rd party tools.
If you rely on a outdated Proton version for compatibility reasons with a specific game, you may have to bite the bullet and run it without fsync and therefore more CPU overhead. :man_shrugging:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.