VM Live Migration with Direct Memory Access and Packet Ownership Transfer

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Live migration of virtual machines (VMs) with Virtual Machine Queue (VMQ) technology poses challenges such as data corruption and unreliable resource release due to direct memory access (DMA) to VM memory, especially when VMs are migrated between hosts, leading to potential crashes and resource corruption.

Innovation Solution

A method where the source NIC driver stops DMA operations and notifies the virtual service provider to 'fake-return' ownership of packets, allowing the VM to process and release resources safely during migration, ensuring reliable resource release and preventing data corruption by intercepting and managing packet processing and memory allocation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If VMQ technology is used to enable direct DMA access from hardware NIC to VM memory, then network performance is improved, but resource release reliability deteriorates during live migration

Engineering Contradiction:
Improvenetwork performanceVSAvoidresource release reliability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces a virtual service provider as an intermediary layer between the hardware NIC and the VM. This mediator manages the VMQ resources and coordinates the transfer of ownership during live migration, ensuring that resources are properly released on the source host and reallocated on the target host without corruption or loss

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent implements preliminary actions by stopping DMA operations before migration begins and pre-coordinating the VMQ resource transfer. The source NIC driver is notified to stop DMAing packets to the VMQ before the VM is migrated, preventing data corruption during the transition

Inventive Principle:
Principle #10Preliminary action

2Productivity

If DMA operations continue during VM migration, then network throughput is maintained, but data corruption occurs in the VM memory

Engineering Contradiction:
Improvenetwork throughputVSAvoiddata corruption
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

The patent applies preliminary anti-action by stopping DMA operations in advance before the VM migration begins. The source NIC driver receives notification to halt DMAing packets to the VMQ before the VM is transferred to the target host, preventing any potential data corruption during the migration process

Inventive Principle:
Principle #9Preliminary anti-action

3Device complexity

If VMQ resources are freed during migration, then resource allocation is optimized, but packet processing completeness deteriorates

Engineering Contradiction:
Improveresource allocation efficiencyVSAvoidpacket processing completeness
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent implements preliminary action by completing all packet processing on the source host before freeing VMQ resources. The system ensures that all packets in the VMQ are processed and ownership is transferred to the VM before the migration completes, guaranteeing packet processing completeness

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses feedback mechanisms where the virtual service provider monitors the processing status of packets in the VMQ and coordinates with the NIC driver to ensure all packets are properly handled before releasing resources. This feedback loop ensures resource freeing only occurs when packet processing is complete

Inventive Principle:
Principle #23Feedback

Applied Scientific Principles

This section explains which scientific principles are used to turn an abstract innovation direction into a practical engineering solution.

Function Achieved in This Case

Ensures reliable resource release and prevents data corruption during VM migration by managing packet processing and memory allocation, allowing seamless live migration of VMs with VMQ technology, applicable beyond VMQ to other network technologies and scenarios like crashed or malicious VMs.

Implementation Method 1

the hardware NIC uses direct media access (DMA) to place all incoming frames targeted to the VM's NIC directly to the VM memory

Methodology Applied
Scientific EffectDirect Memory Access (DMA):

Data Source

PatentUS8281013B2Non-disruptive, reliable live migration of virtual machines with network data reception directly into virtual machines' memory
Publication Date: 2012.10.02 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8281013B2 patent drawing
  • US8281013B2 patent drawing
  • US8281013B2 patent drawing

AI summary

Techniques are disclosed for the non-disruptive and reliable live migration of a virtual machine (VM) from a source host to a target host, where network data is placed directly into the VM's memory. When a live migration begins, a network interface card (NIC) of the source stops placing newly received packets into the VM's memory. A virtual server driver (VSP) on the source stores the packets being processed and forces a return of the memory where the packets are stored to the NIC. When the VM has been migrated to the target, and the source VSP has transferred the stored packets to the target host, the VM resumes processing the packets, and when the VM sends messages to the target NIC that the memory associated with a processed packet is free, a VSP on the target intercepts that message, blocking the target NIC from receiving it.