Virtual Interrupt Handling for Swapped-Out Virtual Machines

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtualized environments, handling interrupts for swapped-out virtual machines consumes significant time and resources, degrading system performance due to frequent context switches and interrupt handling by the virtual machine monitor (VMM).

Innovation Solution

Interrupts for swapped-out virtual machines are written to a designated memory address instead of being raised immediately, allowing the VMM to delay handling until the VM is swapped back in, where the interrupt message automatically raises a hardware interrupt upon context copying, enabling efficient interrupt virtualization.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If interrupts for swapped-out virtual machines are handled immediately by the VMM, then interrupt delivery reliability is maintained, but system performance degrades due to frequent context switches and resource consumption

Engineering Contradiction:
Improveinterrupt delivery reliabilityVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The device writes the interrupt message to memory in advance when the virtual machine is swapped out, before the VM needs to be activated. This preliminary action ensures the interrupt is ready to be automatically raised when the VM is swapped back in, maintaining reliability without requiring immediate VMM intervention

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Memory serves as an intermediary between the device and the virtual machine. Instead of the VMM directly handling interrupts for swapped-out VMs, the interrupt message is stored in memory and automatically transferred to the hardware interrupt controller when the VM is activated, reducing VMM workload and context switches

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If the VMM handles interrupts for swapped-out virtual machines, then interrupt delivery is ensured, but system resource consumption increases

Engineering Contradiction:
Improveinterrupt deliveryVSAvoidsystem resource consumption
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The interrupt handling function is extracted from the VMM and transferred to the hardware interrupt controller. The VMM no longer needs to actively manage interrupts for swapped-out VMs, as the hardware automatically raises interrupts based on messages written to memory, reducing VMM resource consumption

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The system uses hardware automatic interrupt raising to serve itself rather than requiring VMM intervention. When a virtual machine is activated, the hardware automatically checks for pending interrupt messages in memory and raises appropriate interrupts, eliminating the need for VMM resource expenditure on interrupt handling

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS8886862B2Virtualization of interrupts
Publication Date: 2014.11.11 MELLANOX TECHNOLOGIES LTD(IL)
  • US8886862B2 patent drawing
  • US8886862B2 patent drawing
  • US8886862B2 patent drawing

AI summary

A method for computing includes running a plurality of virtual machines on a computer having one or more cores and a memory. Respective interrupt addresses in the memory are assigned to the virtual machines. Upon occurrence on a device connected to the computer of an event pertaining to a given virtual machine during a period in which the given virtual machine is swapped out of operation, an interrupt message is written from the device to a respective interrupt address that is assigned to the given virtual machine in the memory. Upon activating the given virtual machine on a given core after writing of the interrupt message, a context of the given virtual machine is copied from the memory to the given core, and a hardware interrupt is automatically raised on the given core responsively to the interrupt message in the memory.