FUTEX2 NUMA & Small Futexes Revived For Linux

Written by Michael Larabel in Linux Kernel on 25 October 2024 at 06:55 AM EDT. 7 Comments
LINUX KERNEL
Back in 2020~2021 there was lots of talk and work around FUTEX2 for improving the Linux kernel's Futex implementation for fast user mutex. The FUTEX2 work was driven in large part for helping Steam Play / Wine gaming by better matching the behavior of Microsoft Windows with its WaitForMultipleObjects handling. While the initial code landed back in Linux 5.16, there's been other remaining FUTEX2 features still desired like variable-sized futexes and NUMA-awareness. Finally now we're seeing that work revived.

Longtime Linux developer Peter Zijlstra sent out a set of patches today for finishing up "the remaining futex2 bits". In particular, working out FUTEX2 NUMA support and variable-sized "small" futexes with 8-bit and 16-bit support to complement the standard 32-bit futex.

Zijlstra wrote in the patch series:
"By popular demand a repost of the remaining futex2 bits.

Notably this is the FUTEX2_NUMA and FUTEX2_{8,16} 'small' futex support.

I'm not sure how much demand there actually is, since back-channels and whispers don't really count. So for those of you out there on the big wide interweb, if you want this, respond with Tested-by tags.

I know Christoph wants the NUMA bits, so I suppose that is at least one user for this new interface, and that might see it through, but more interested parties would be better and certainly move things along faster.

Same goes for the small futex bits, if nobody replies, they're going to get left behind -- again!"

Now to see if the FUTEX2 NUMA and small futex support makes it into the mainline Linux kernel in a 2025 release...
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week