VM Memory Migration via RDMA and PFN Mapping
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Virtual machine migration on virtualization platforms incurs high CPU utilization and time overhead due to the need for mapping memory and updating page tables using hypercalls.
Innovation Solution
A method that involves obtaining a data sending request for a virtual machine, querying a correspondence information base to establish a mapping between physical frame numbers (PFNs) and physical memory page addresses, and using an RDMA network adapter to send memory data directly to a destination host, thereby bypassing the need for user-mode space mapping and hypercall updates.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If memory mapping and page table updates are performed using hypercalls during virtual machine migration, then the migration can be completed with proper memory management, but the CPU utilization and time overhead increase significantly
Solution Approach 1:
The patent extracts the memory mapping and page table update operations from the traditional hypercall-based virtualization layer and relocates them to user-space processes. This allows the kernel to bypass these expensive operations during migration by directly accessing physical memory through pre-established mappings, thereby reducing CPU utilization and migration time overhead while maintaining memory management correctness through careful user-space implementation
Solution Approach 2:
The patent introduces correspondence information bases as intermediary data structures that store the mapping relationships between virtual machine memory addresses and physical frame numbers. These bases act as mediators between the migration process and physical memory, enabling direct access without requiring traditional memory mapping and page table updates, thus resolving the contradiction between reliable memory management and migration efficiency
2Reliability
If traditional memory mapping methods are used during virtual machine migration, then memory access can be properly managed, but the time overhead and CPU utilization increase
Solution Approach 1:
The patent performs preliminary establishment of correspondence information bases before the actual migration process begins. These bases pre-store the mapping relationships between virtual machine memory and physical frames, allowing the migration process to directly query and access memory without performing time-consuming mapping operations during migration, thus reducing migration time while ensuring memory access correctness
Solution Approach 2:
The patent creates simplified copies of memory mapping information in the correspondence information bases, which are maintained in user-space. These copies enable fast direct access to physical memory during migration without requiring the complex kernel-space mapping operations, thereby reducing migration time overhead while maintaining proper memory access through the copied mapping information
Data Source
AI summary
A method for migrating memory data of a virtual machine, and a related apparatus, and a cluster system are provided. The method includes: obtaining a data sending request for sending memory data of a first virtual machine, where the request includes an identity of the first virtual machine and a PFN of the memory data that is requested to be sent; querying a correspondence information base according to the identity of the first virtual machine to obtain a correspondence of the first virtual machine; querying the correspondence of the first virtual machine according to the PFN of the memory data that is requested to be sent, so as to obtain a physical memory page address of the memory data; and sending, to a destination physical host by using an RDMA network adapter, memory data stored at the physical memory page address of the memory data.


