x86 FPU Optimizations Land In Linux 5.2 That Torvalds Loves But Worries Of Regressions

Written by Michael Larabel in Linux Gaming on 12 May 2019 at 02:59 AM EDT. 30 Comments
LINUX GAMING
As part of the first week of changes for the Linux 5.2 merge window, a patch series providing some x86 FPU optimizations were merged though there is some concern there could be regressions on older hardware.

The patch series that has been in the works for a while is optimizing when to load FPU registers by now only doing so when returning to user-space and not with every context switch. The changes also make it cheaper to call kernel_fpu_begin() and in the process also cleans up some of the kernel's admittedly complex FPU code. More details on this floating point code cleanup and optimizations via the patch series message.

While the optimizations look nice, Linus Torvalds pulled the code into Linux 5.2 but expressed concerns over the possibility of regressions:
I love this and we should have done it long ago, but I also worry that every time we've messed with the FP state, we've had interesting bugs. Which is obviously why we didn't do this long ago.

Has this gone through lots of testing, particularly with things like FP signal handling and old machines that don't necessarily have anything but the most basic FP state (ie Pentium class etc)?

I've pulled it, but I'd still like to feel safer about it after-the-fact ;)

One of the developers involved commented it had been tested as far back as AMD K8 so far, at least on his end. The code has been in mainline Linux Git for a few days now without a revert, so at least for now it's so far, so good.
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