Intel Resurrecting FSGSBASE Support For Linux To Help With Performance
Written by Michael Larabel in Intel on 12 September 2019 at 06:30 PM EDT. 1 Comment
INTEL --
Going on for months had been work by Intel Linux developers on supporting the FSGSBASE instruction for helping Intel CPU performance going back to Ivybridge where this instruction set extension was first introduced. The FSGSBASE support was queued for the Linux 5.3 kernel but was reverted due to "serious bugs" in the implementation. Intel has now published a revised version of this support.

The FSGSBASE instruction allows for reading/write to the FS/GS BASE from any privilege and should help with performance in areas like context switching that has been hurt over the past year and a half due to the likes of Spectre, Meltdown and Foreshadow. User-space programs like Java could also optimize their performance by making use of the FSGSBASE instruction itself to avoid system calls for editing the FS/GS BASE.

Our tests of Intel's FSGSBASE patches from earlier this year confirmed the potential of seeing some minor performance gains particularly in areas affected by the various speculative execution mitigations.

All had been quiet on the FSGSBASE front since the patches were reverted but now a new revision has been volleyed to the kernel mailing list. Also complicating things is that since the patches were rejected, Spectre SWAPGS came to light and warranted changes to this FSGSBASE support.

So with version eight of these patches, there are SWAPGS mitigations to the work and a variety of code fixes to hopefully ease the review and close the previous bugs reported from this code.

But given the timing of this new round of patches, we're unlikely to see the code land for Linux 5.4 with that merge window opening up this weekend. As such, we're unlikely to see this Intel performance-boosting functionality in place until at least Linux 5.5 with that being the first stable kernel release in turn for 2020.
About The Author
Author picture

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 10,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 or contacted via MichaelLarabel.com.

Related Intel News
Popular News This Week