Multikernel Linux: multiple kernels on one machine without a hypervisor
Translated by a model; the original is in Russian.
A year ago a multikernel architecture was proposed for the Linux kernel, allowing several independent kernel instances to coexist on a single physical machine. Each instance runs on dedicated processor cores while sharing common hardware resources. Today the Linux 7.0-mk2 release is out — essentially the first public build in which a year's worth of accumulated patches have been collected together against the 7.0 kernel tree for ease of testing and evaluation.
How it works
Developer Cong Wang of Multikernel Technologies describes the idea this way: mklinux lets a single machine run several independent Linux kernels at once on bare metal — without a hypervisor. The host kernel owns a pool of processor cores, memory and PCI devices, slices that pool into separate instances, and boots a “spawned” kernel into each of them via kexec_file_load(). Each such kernel executes natively on its own processor cores, its own physical memory and its own devices. Nothing is emulated or intercepted — the only things that stay shared are the ones you yourself decide to share.
Instances are declared through a device tree written to /sys/fs/multikernel/, and overlays make it possible to move memory, processor cores and devices between the pool and running instances without a reboot. An instance can be shut down, its resources returned to the pool, and then restarted with a different kernel.
Differences from virtualization and containers
Compared with virtual machines, there is no VM exit path, no second level of page tables and no device model. Compared with containers, the instances do not share a single kernel, so a lockup, panic or exploit in one kernel cannot reach into another — which looks appealing from an isolation standpoint.
Performance
The announcement includes benchmarks promoting the approach's advantage over KVM: first a comparison in a 2-core versus 2-vCPU configuration, and then tests on a 24-core system demonstrating the gain from running two kernels instead of one.
The details are laid out in today's announcement on the Linux kernel mailing list. It is still unclear whether, and exactly when, multikernel support will make it into the mainline kernel — and even if it does, it apparently won't be anytime soon.
Source: Phoronix
Comments
Sign in, to comment.