Guest Idle Polling State Detection for CPU Overcommit

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In virtualization systems, idle-polling VCPUs are not effectively recognized as idle by the hypervisor, leading to inefficiencies in CPU overcommitment, especially when there are not enough idle processors, resulting in increased latency and reduced ability to schedule new tasks efficiently.

Innovation Solution

A system where a guest records its idle-polling state in memory, allowing the hypervisor to detect and schedule tasks on host CPUs without causing VM exits, by using a memory monitoring instruction and recording the state in a guest memory location, enabling the hypervisor to preempt idle-polling VCPUs and allocate resources more efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If the hypervisor uses traditional idle detection methods, then it can identify idle VCPUs, but it cannot accurately recognize idle-polling VCPUs, leading to inefficient CPU overcommitment

Engineering Contradiction:
Improveidle VCPU detection accuracyVSAvoidCPU overcommitment efficiency
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent introduces a memory location as an intermediary between the idle-polling VCPU and the hypervisor. The VCPU writes to this memory location when entering idle-polling state, and the hypervisor reads from it to detect the idle state, enabling accurate recognition without requiring VM exits

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent replaces the traditional mechanical VM exit mechanism with a memory-based signaling approach. Instead of using hardware-level VM exits to communicate idle state, the system uses software-level memory writes and reads, eliminating the overhead and inaccuracy of traditional detection methods

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Productivity

If the hypervisor preempts idle-polling VCPUs to schedule new tasks, then CPU utilization improves, but latency increases due to lack of idle processor availability

Engineering Contradiction:
Improvetask scheduling efficiencyVSAvoidtask execution latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent implements a feedback mechanism where the hypervisor continuously monitors the memory location written by idle-polling VCPUs. This real-time feedback allows the hypervisor to make informed scheduling decisions, preempting VCPUs that are truly idle and maintaining low latency for time-sensitive tasks

Inventive Principle:
Principle #23Feedback

3Productivity

If more virtual machines are scheduled on the same physical processors, then hardware utilization improves, but system complexity increases

Engineering Contradiction:
Improvehardware utilization rateVSAvoidvirtualization management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent enables idle-polling VCPUs to self-identify their state by writing to the memory location, eliminating the need for complex hypervisor intervention to detect idle states. This self-service approach simplifies the overall system while enabling higher VM density

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11243795B2CPU overcommit with guest idle polling
Publication Date: 2022.02.08 RED HAT INC
  • US11243795B2 patent drawing
  • US11243795B2 patent drawing
  • US11243795B2 patent drawing

AI summary

A system for CPU overcommit with guest idle-polling includes a memory, a plurality of host CPUs in communication with the memory, a virtual machine, and a hypervisor. The plurality of host CPUs include a first host CPU and a second host CPU. The virtual machine includes a virtual central processing unit (VCPU) and a guest. In an example, the VCPU executes on the first host CPU. The guest records in a location of guest memory a value indicating that the VCPU is in an idle-polling state. Then, when the hypervisor detects that a new task needs to be executed, the hypervisor reads the value in the location of the guest memory and determines that the VCPU is in the idle-polling state. Then, the hypervisor schedules the new task to the first host CPU.