Kexec Firmware Update Using Extended Control Pages
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current kexec-based upgrade workflows in Linux lack the capability to transfer user and configuration data to the new kernel, resulting in data loss and increased processing time due to reliance on secondary storage, and do not support dynamic data transfer using elastic page sizes.
Innovation Solution
The implementation of extended control pages with variable sizes, which are allocated and managed as a linked list, allows for the direct transfer of user and application-specific data from the old kernel to the new kernel during the kexec process, ensuring immediate availability of this data upon boot and reducing reboot time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If kexec mechanism is used for system upgrade, then reboot time is reduced and system availability is improved, but user data and configuration data are lost and must be regenerated
Solution Approach 1:
The patent introduces control pages as an intermediary data structure that enables direct memory-to-memory data transfer between old and new kernels during kexec. The control pages act as a mediator that carries user data, configuration data, and application state information across the kernel transition boundary, eliminating data loss without requiring secondary storage I/O.
Solution Approach 2:
The patent implements preliminary data preparation by copying required user data and configuration information into control pages during the old kernel execution phase, before the actual kexec transition occurs. This preliminary action ensures that all necessary data is pre-positioned in memory for immediate availability to the new kernel, avoiding any data loss and eliminating the need for post-boot data regeneration.
2Reliability
If secondary storage is used to transfer data across kexec OS, then data can be persisted, but processing time increases and performance decreases
Solution Approach 1:
The patent replaces the mechanical secondary storage I/O system with an in-memory data transfer mechanism. Instead of writing data to disk and reading it back during kexec transitions, the system uses control pages allocated in volatile memory to transfer data directly between kernels. This substitution eliminates the slow mechanical I/O operations while maintaining data integrity through proper memory management and control page validation.
3Device complexity
If fixed page size is used for data transfer, then memory management is simplified, but elastic data transfer requirements cannot be met
Solution Approach 1:
The patent implements dynamic control pages with variable sizes that can be allocated based on the actual data transfer requirements. Instead of using fixed page sizes, the system allocates control pages of different sizes dynamically during runtime, allowing elastic adaptation to various data transfer scenarios. This dynamic approach maintains relatively simple memory management through use of existing kernel memory allocation mechanisms while providing the flexibility needed for different data sizes and types.
Data Source
AI summary
A kexec-based system update process wherein user-specific data is transferred on reboot of the second kernel. Upon initializing kexec load, buffer memory is assigned to the second kernel and the system loads control pages of fixed size for the second kernel boot, and also loads user-specific data onto extended control pages of variable size. Upon boot of the second kernel, the user-specific data is extracted from the extended control pages and transferred to the corresponding applications.


