Linux 5.2 Live-Patching Makes Use Of GCC 9 Option That May Slowdown Select Cases
If you make use of Linux kernel live-patching or even just have CONFIG_LIVEPATCH enabled, when switching to Linux 5.2 and building with GCC 9, the performance may be impacted in select workloads.
The Linux livepatching infrastructure updates were sent in this week for the Linux 5.2 kernel merge window. The changes aren't too exciting but does include the change we previously outlined of turning on GCC 9's live-patching option as part of the kernel build when CONFIG_LIVEPATCH is enabled.
The new GCC 9 compiler release brought this live-patching compiler option that will disable some optimizations that could potentially interfere or cause issues with how live-patching binaries are handled. It's a safety flag to ensure the generated code is safe for use in a live-patching context, but with disabling some optimizations, there are performance implications.
SUSE's Miroslav Benes who landed this change found:
Aside from that, there isn't much to the livepatching PR for Linux 5.2.
The Linux livepatching infrastructure updates were sent in this week for the Linux 5.2 kernel merge window. The changes aren't too exciting but does include the change we previously outlined of turning on GCC 9's live-patching option as part of the kernel build when CONFIG_LIVEPATCH is enabled.
The new GCC 9 compiler release brought this live-patching compiler option that will disable some optimizations that could potentially interfere or cause issues with how live-patching binaries are handled. It's a safety flag to ensure the generated code is safe for use in a live-patching context, but with disabling some optimizations, there are performance implications.
SUSE's Miroslav Benes who landed this change found:
Performance impact of the option was measured on three different Intel machines - two bigger NUMA boxes and one smaller UMA box. Kernel intensive (IO, scheduling, networking) benchmarks were selected, plus a set of HPC workloads from NAS Parallel Benchmark. The tests were done on upstream kernel 5.0-rc8 with openSUSE Leap 15.0 userspace.So at least building this kernel with "-flive-patching=inline-clone" by default (when CONFIG_LIVEPATCH is enabled) shouldn't cause widespread slowdowns, be aware that there are possible slowdowns particularly in scheduler workloads. Of course, we'll have out our own Linux 5.2 kernel benchmarks in short order.
The majority of the tests is unaffected. The only significant exception is the scheduler section which suffers 1-3% degradation.
Aside from that, there isn't much to the livepatching PR for Linux 5.2.
4 Comments