Benchmarking The Intel Performance Change With Linux FSGSBASE Support
As covered last week, the Linux kernel is finally about to see FSGSBASE support a feature supported by Intel CPUs going back to Ivybridge and can help performance. Since that earlier article the FS/GS BASE patches have been moved to the x86/cpu branch meaning unless any last-minute problems arise the functionality will be merged for the Linux 5.3 cycle. I've also begun running some benchmarks to see how this will change the Linux performance on Intel hardware.
See the aforelinked article for more background information on this functionality that's been available in patch form for the Linux kernel going back years but hasn't been mainlined -- well, until hopefully next month. FSGSBASE should help in context switching performance which is particularly good news following the various CPU vulnerabilities like Meltdown and Zombieload that have really hurt the context switching performance.
For this testing I compared Linux 5.2 Git to the WIP.x86/cpu tree from last week that has these FSGSBASE patches. The same Kconfig was carried over from the Linux 5.2 Git kernel to the custom build from the wip.x86/cpu tree. In addition to the direct kernel comparison, I did a run with the Linux 5.2 Git kernel when disabling the CPU mitigations (mitigations=off) for seeing how much of a performance gain these patches can make relative to the performance costs incurred over the past year and a half.
This initial testing was done with an Intel Core i9 7980XE while once the Linux 5.3 cycle is underway there will certainly be benchmarks with more hardware. A variety of benchmarks were carried out using the open-source Phoronix Test Suite from this Ubuntu Skylake-X system.