Linux 5.2 Live-Patching Makes Use Of GCC 9 Option That May Slowdown Select Cases
Written by Michael Larabel in Linux Kernel on 12 May 2019 at 12:22 AM EDT. 4 Comments
LINUX KERNEL --
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:
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.

The majority of the tests is unaffected. The only significant exception is the scheduler section which suffers 1-3% degradation.
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.

Aside from that, there isn't much to the livepatching PR for Linux 5.2.

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 Linux Kernel News
Popular News This Week