A Google engineers published a set of patches for discussion among Linux kernel developers regarding the implementation of the Live Update Orchestrator (LUO) subsystem, designed for updating the kernel in Live mode. Unlike mechanisms such as livepatch, Ksplice, kpatch, and kGraft, the new system is not limited to applying individual fixes to a running Linux kernel, but allows for a complete reboot and update of the kernel without stopping the operation of individual devices. The project is based on a set of KHO (Kexec HandOver) patches for the kexec mechanism, which is used for loading a new kernel from an already running Linux kernel without a physical reboot.
The primary area of application for LUO is cloud environments, where the ability to update the KVM hypervisor without disrupting running operations will be available. virtuális gépekhezSpecifically, it will be possible to suspend virtuális gépek during the kernel reboot with the hypervisor, keeping all devices attached to the virtual machines operational.
To realize this capability, LUO provides functionalities for saving the state of devices before switching to the new kernel and restoring the state immediately after activating the new kernel in such a way that continuous operations of the system and applications in user space with devices are not interrupted. During the kernel reboot, continuity of operations with DMA and activities related to interrupt processing is also ensured.
To coordinate the state saving and switch to the new kernel, LUO provides an API that allows other kernel subsystems to connect handlers for monitoring and participating in the Live reboot process. Among the subsystems that can integrate with LUO are the KVM hypervisor, iommu, interrupt system, and drivers. KHO (Kexec HandOver) is used to transfer memory state from the old kernel to the new one. Management is performed through sysfs files "/sys/kernel/liveupdate/{state, prepare, finish}".
Forrás: opennet.ru
