Linux Developers Are Once Again Trying To Enable Intel FSGSBASE For Better Performance
For years there have been patches floating around for helping the performance of context switching sensitive workloads going back to "Ivy Bridge" CPUs but without ever crossing the finish line to get this "FSGSBASE" support merged. But now in 2020 it's once again being attempted.
These patches are about enabling FSGSBASE instruction usage for allowing reading and writing to the FS/GS BASE from any privilege level. There are performance benefits thanks to skipping a system call and MSR write and also register savings.
Last year was a fair amount of Linux kernel patches floating around on the FSGSBASE front, which was certainly welcome considering how context switching performance has been hammered in the past two years as a result of the various mitigations like Spectre and Meltdown.
There were patches for this FSGSBASE Linux support towards the end of last year but then all fell silent without the code being merged and seemingly held up by awaiting feedback from GDB debugger developers.
Microsoft's Sasha Levin is now trying to get the work back on track. He revived the latest mailing list thread in hopes of seeing some action and getting any remaining questions/issues sorted out so it could be mainlined. Why would Microsoft's prominent Linux kernel engineer care? Presumably over maximizing performance in their Azure cloud given more than half of those instances are running Linux and especially with the hits encountered since 2018 as a result of the speculative execution vulnerabilities.
Intel's Andi Kleen meanwhile reaffirmed today, "Nothing breaks, and it's a nice improvement for context switch performance, in NMI/PMU performance, and also gives user space two free registers to play around with."
Here's to hoping the Intel FSGSBASE support for Linux can get squared away this year -- hopefully now for the Linux 5.8 cycle. Meanwhile Intel Ivy Bridge as the first processors with FSGSBASE support are marking eight years since launch later this month.
These patches are about enabling FSGSBASE instruction usage for allowing reading and writing to the FS/GS BASE from any privilege level. There are performance benefits thanks to skipping a system call and MSR write and also register savings.
Last year was a fair amount of Linux kernel patches floating around on the FSGSBASE front, which was certainly welcome considering how context switching performance has been hammered in the past two years as a result of the various mitigations like Spectre and Meltdown.
There were patches for this FSGSBASE Linux support towards the end of last year but then all fell silent without the code being merged and seemingly held up by awaiting feedback from GDB debugger developers.
Microsoft's Sasha Levin is now trying to get the work back on track. He revived the latest mailing list thread in hopes of seeing some action and getting any remaining questions/issues sorted out so it could be mainlined. Why would Microsoft's prominent Linux kernel engineer care? Presumably over maximizing performance in their Azure cloud given more than half of those instances are running Linux and especially with the hits encountered since 2018 as a result of the speculative execution vulnerabilities.
Intel's Andi Kleen meanwhile reaffirmed today, "Nothing breaks, and it's a nice improvement for context switch performance, in NMI/PMU performance, and also gives user space two free registers to play around with."
Here's to hoping the Intel FSGSBASE support for Linux can get squared away this year -- hopefully now for the Linux 5.8 cycle. Meanwhile Intel Ivy Bridge as the first processors with FSGSBASE support are marking eight years since launch later this month.
14 Comments