x86 FPU Optimizations Land In Linux 5.2 That Torvalds Loves But Worries Of Regressions
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:
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.
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.
30 Comments