Memory Migration Using Traversal Processing Sending Threads
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing memory migration methods in virtual machine live migration are inefficient due to bottlenecks in processing operations during the memory migration process, leading to delayed dirty pages and potential memory inconsistency between source and destination virtual machines.
Innovation Solution
The implementation of a memory migration method that utilizes multiple threads, including a traversal thread, a processing thread, and a sending thread, to independently execute operations such as traversing dirty bitmaps, reading and processing dirty page data, and transmitting data, with round number flag information ensuring data consistency and allowing parallel execution of operations without synchronization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If a single migration thread copies dirty pages iteratively to the destination end, then memory migration can be completed, but the migration efficiency is low due to bottlenecks in processing operations
Solution Approach 1:
The patent divides the memory migration process into three independent threads: a traversal thread that traverses dirty bitmaps and assigns dirty page addresses, a processing thread that reads dirty page data and adds round number flag information, and a sending thread that transmits data to the destination end. This segmentation allows each thread to operate independently and concurrently, eliminating the bottlenecks that occur when a single thread performs all operations sequentially, thereby improving memory migration efficiency and reducing migration time.
2Productivity
If multiple threads are used to execute operations in parallel, then memory migration efficiency is improved, but thread coordination and data consistency become more complex
Solution Approach 1:
The patent introduces a dirty bitmap as an intermediary data structure that the traversal thread writes to and the processing thread reads from. This intermediary mechanism allows threads to coordinate their operations without requiring complex synchronization primitives. The dirty bitmap serves as a shared resource that naturally manages the flow of work between threads, reducing coordination complexity while maintaining parallel execution efficiency.
Solution Approach 2:
The patent implements a feedback mechanism where the processing thread reads dirty page addresses from the dirty bitmap, processes the pages, and the sending thread transmits them to the destination. The round number flag information added to each dirty page provides feedback about the iteration round, allowing the destination end to restore data in the correct sequence. This feedback mechanism ensures data consistency without requiring complex thread synchronization.
3Reliability
If dirty pages are sent to the destination end only after complete processing in each iteration round, then data consistency is maintained, but migration speed is reduced due to sequential processing
Solution Approach 1:
The patent applies preliminary action by having the traversal thread pre-traverse the dirty bitmap and assign dirty page addresses to the processing thread before the processing thread actually reads and processes the dirty page data. This allows the traversal operation to proceed independently and concurrently with subsequent processing operations, rather than waiting for each processing step to complete before starting the next traversal. The round number flag information ensures that even with this reordering, data consistency is maintained at the destination end.
Data Source
AI summary
Embodiments of this application provide a memory migration method, an apparatus, and a computing device. The method includes: creating a processing thread, a sending thread, and a traversal thread for a memory region; where the traversal thread iteratively executes a traversal operation, where the traversal operation includes traversing a dirty bitmap of the memory region and assigning a dirty page address to a corresponding processing thread; the processing thread iteratively executes a processing operation, where the processing operation includes reading dirty page data based on the assigned dirty page address, and adding round number flag information to the dirty page data to generate a to-be-migrated dirty page; and the sending thread iteratively executes a transmission operation, where the transmission operation includes sending the to-be-migrated dirty page to a destination end, and the destination end restores respective dirty page data to destination memories based on iteration round numbers in different to-be-migrated dirty pages. The embodiments of this application improve memory migration efficiency.


