Deferred I/O Device Assignment in Post-Copy VM Migration

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing virtual machine migration methods, particularly post-copy migration, are ineffective for virtual machines supporting Direct Memory Access (DMA) by I/O devices due to the reliance on page fault mechanisms, which I/O devices do not trigger and cannot tolerate.

Innovation Solution

Implementing a deferred assignment of devices in virtual machine live migration by starting the virtual machine in post-copy migration mode, ensuring all memory pages associated with I/O devices are successfully migrated before creating entries in the guest I/O table, and allowing access to I/O devices only after complete migration, with pre-copying of memory pages used by I/O devices to accelerate the process.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If post-copy migration is used to improve migration speed, then migration duration is reduced, but I/O devices cannot function because they do not trigger page faults and cannot tolerate the migration approach

Engineering Contradiction:
Improvemigration speedVSAvoidI/O device functionality
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies preliminary action by pre-copying memory pages associated with I/O devices before the migration is completed. This ensures that all necessary data is transferred in advance, allowing I/O devices to be assigned to the destination host without functional issues, thus resolving the contradiction between fast post-copy migration and I/O device reliability.

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If I/O devices are assigned early in migration, then device access is enabled, but memory pages may not have been migrated yet causing data inconsistency

Engineering Contradiction:
Improvedevice accessVSAvoidmemory consistency
Core Design Contradiction:
Ease of operationVSStability of the object's composition

Solution Approach 1:

The patent implements feedback by continuously monitoring the migration status of memory pages and using this information to control I/O device assignment. The system waits for confirmation that all associated memory pages have been successfully migrated before assigning I/O devices, ensuring both device accessibility and memory consistency.

Inventive Principle:
Principle #23Feedback

3Stability of the object's composition

If all memory pages are migrated before starting the virtual machine, then data consistency is ensured, but migration duration increases significantly

Engineering Contradiction:
Improvememory consistencyVSAvoidmigration duration
Core Design Contradiction:
Stability of the object's compositionVSLoss of time

Solution Approach 1:

The patent applies preliminary action selectively by pre-copying only the memory pages associated with I/O devices rather than all memory pages. This targeted approach ensures data consistency for I/O operations while minimizing the time overhead, thus resolving the contradiction between memory consistency and migration duration.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9639388B2Deferred assignment of devices in virtual machine migration
Publication Date: 2017.05.02 RED HAT ISRAEL
  • US9639388B2 patent drawing
  • US9639388B2 patent drawing
  • US9639388B2 patent drawing

AI summary

Systems and methods for deferred assignment of devices in virtual machine migration. An example method comprises: starting, by a processing device of a first host computer system, a virtual machine being migrated from a second host computer system in a post-copy migration mode; receiving a request to associate an input/output (I/O) device with the virtual machine; and responsive to receiving, from the second host computer system, one or more memory pages comprised by a memory buffer associated with the I/O device, performing at least one of: associating an identifier of the I/O device with the memory buffer or allowing the virtual machine to access the I/O device.