Kernel Update Method Using Interface Mapping Table for Seamless Driver Service Continuity
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing kernel update methods disrupt the driver service provided to service applications during the update of loadable kernel modules, requiring service termination and increasing the time and resource costs for resuming the service.
Innovation Solution
A kernel update method that uses an interface mapping table to temporarily stop forwarding service requests to the original driver logic module, replaces it with an updated driver logic module, and records the state of the service to ensure continuity, allowing the service to resume quickly without user intervention.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the entire loadable kernel module is unloaded and reloaded during update, then the driver logic can be updated, but the driver service provided to service applications is terminated and must be restarted
Solution Approach 1:
The loadable kernel module is divided into two independent parts: the interface module (providing stable interfaces) and the driver logic module (containing updateable logic). This segmentation allows the driver logic module to be replaced without affecting the interface module, enabling seamless updates while maintaining service continuity through interface persistence.
Solution Approach 2:
The interface module acts as an intermediary between service applications and the driver logic module. During updates, the interface module remains active and continues to receive service requests, temporarily buffering them while the driver logic module is replaced. This intermediary role prevents direct disruption to service applications.
2Reliability
If the driver logic module is replaced while maintaining the interface module, then service continuity is improved, but the system complexity increases due to module separation and interface mapping
Solution Approach 1:
The interface module serves multiple functions: it provides stable interfaces for service applications, manages the interface mapping table, buffers service requests during updates, and coordinates the replacement process. This multi-functionality reduces the need for additional dedicated components, thereby limiting the increase in system complexity.
Solution Approach 2:
The system dynamically changes the state parameter of the interface mapping table (from valid to invalid and back) to control request forwarding during updates. This parameter-based control mechanism provides a simple way to manage complexity compared to more complex state machine or event-driven approaches.
3Reliability
If service requests are buffered during driver logic module replacement, then service continuity is maintained, but memory resources are consumed for buffering
Solution Approach 1:
Instead of buffering all service requests indefinitely, the system buffers only the necessary minimum number of requests required to maintain service continuity during the brief update window. This partial buffering approach provides sufficient service continuity while minimizing memory resource consumption.
Data Source
Figure 1~2
Figure 3~4
Figure 5~5(c)
AI summary
The present invention relates to the computer field, and discloses a kernel update method and apparatus, and a computer device. The computer device executes the kernel update method to update a loadable kernel module in a kernel. First, the computer device sets a first interface mapping table to be invalid. The invalid first interface mapping table makes an interface module stop sending a service request of a service application to a driver logic of a first driver logic module, so that the first driver logic module temporarily stops providing a driver service for the service application. Then, the computer device replaces the first driver logic module in the loadable kernel module with a second driver logic module, and records, in a second interface mapping table, each interface in the interface module and a driver logic that is corresponding to the interface and that is in the second driver logic module. After the loadable kernel module is updated, the second driver logic module executes a driver logic on a new service request that is forwarded by the interface module according to the second interface mapping table, so as to resume providing the driver service for the service application.