Show Your Support: This site is primarily supported by advertisements. Ads are what have allowed this site to be maintained on a daily basis for the past 18+ years. We do our best to ensure only clean, relevant ads are shown, when any nasty ads are detected, we work to remove them ASAP. If you would like to view the site without ads while still supporting our work, please consider our ad-free Phoronix Premium.
Linux 5.2 Live-Patching Makes Use Of GCC 9 Option That May Slowdown Select Cases
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.