Multiverse: Compiler-Assisted Dynamic Variability Management in the Linux Kernel

Entry in the university information system at FAU Erlangen-Nürnberg

Linux can be considered as a prime example of variability and configurability in software systems, regarding its various areas of operation from small embedded devices to supercomputers. In most cases, variability requirements are resolved statically, during the compilation of the kernel, by selecting and inserting the configured features into the final compilation product. However, configuration can not always be determined statically. Sometimes, it is necessary to defer the adaption of a software system to the run-time, making the configuration dynamic.

Dynamic variability is, due to its application at run-time, often linked to considerable performance penalties, arising from branches in the control flow. In the Linux kernel, run-time binary patching mechanisms are applied in order to eliminate these performance issues by removing branches in the control flow. Unfortunately, such live patching techniques are often difficult to apply and usually incorporate complex implementations which increase maintainability costs.

Function Multiverse is a new approach to handle dynamic variability requirements. In this work its applicability as an alternative method to the current solutions in the Linux kernel is investigated. Due to its compiler-based approach, Multiverse promises to make binary patching easier and more efficient to realize.

As part of this work, Multiverse was successfully applied in the Linux kernel. Results from microbenchmarks show an increased performance in many cases. Besides this, a possible complexity reduction in the source code is suggested in case of a more extensive use of Multiverse throughout the kernel.

Thesis [PDF]