Optimistic Interrupt Affinity for Virtual Processors
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In computer systems with multiple processors, the frequent generation of inter-processor interrupts (IPIs) due to device interrupts leads to overhead and inefficiencies, especially when virtual processors handle interrupts on different physical processors from the host's scheduler assignment.
Innovation Solution
A method and system that updates the device and interrupt controller to forward device interrupts directly to the virtual processor's physical processor, eliminating the need for inter-processor interrupts by reconfiguring the interrupt mapping based on thresholds and virtual processor migrations.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If the host's scheduler assigns device interrupts to one physical processor while the virtual processor runs on a different physical processor, then the virtual machine can maintain its own scheduling independence, but inter-processor interrupts are generated introducing overhead and reducing efficiency
Solution Approach 1:
The patent introduces an intermediary mechanism that maps virtual processor identifiers to physical processor identifiers. When a device interrupt arrives, the interrupt controller uses this mapping to directly forward the interrupt to the physical processor running the virtual processor, eliminating the need for inter-processor interrupts while preserving virtual machine scheduling independence
Solution Approach 2:
The patent changes the parameter of interrupt routing by dynamically adjusting the mapping between virtual and physical processors. When virtual processors migrate between physical processors, the mapping is updated to reflect the new location, ensuring interrupts are always routed to the correct physical processor without generating IPIs
2Adaptability or versatility
If interrupts are frequently forwarded between physical processors, then virtual processors can be dynamically migrated between physical processors, but the frequency of inter-processor communications increases overhead
Solution Approach 1:
The patent performs preliminary action by pre-establishing the mapping between virtual and physical processors before interrupts occur. When virtual processors are migrated, the mapping is updated in advance, so that subsequent interrupts are immediately routed to the new physical processor location without requiring runtime IPIs
Solution Approach 2:
The patent implements feedback by tracking the location of virtual processors and using this information to dynamically update interrupt routing. The system monitors virtual processor migrations and adjusts the mapping accordingly, creating a closed-loop system that optimizes interrupt delivery based on current system state
Data Source
AI summary
A computing apparatus determines that a virtual processor of a guest has been moved from a first physical processor of a host to a second physical processor of the host. The computing apparatus identifies a device that is controlled by the virtual processor, wherein device interrupts for the device are forwarded to the virtual processor. The computing apparatus updates at least one of the device or an interrupt controller to cause at least one of the device or the interrupt controller to send the device interrupts to the second physical processor of the host, wherein the second physical processor of the host forwards the device interrupts to the virtual processor running on the second physical processor without generating an inter-processor interrupt.


