KVM VCPU Scheduling for Interruptability Holder Preemption

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In a virtual symmetric multiprocessing environment, the interrupt remapping mechanism is prone to failure due to conflicts with the NAPI processing mode in Linux, leading to interruptability holder preemption, which causes delays in processing network I/O events and reduces I/O performance.

Innovation Solution

A comprehensive scheduling method and device that globally controls and analyzes the state of interruptability holders, ensuring fair system scheduling by selecting a suitable virtual CPU, marking it as an interruptability holder, and scheduling it to maintain device interruptability, thereby preventing preemption and enhancing I/O performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If interrupt remapping mechanism is used to improve I/O performance, then I/O throughput and responsivity are improved, but the mechanism is prone to failure due to conflict with NAPI processing mode

Engineering Contradiction:
ImproveI/O throughputVSAvoidinterrupt remapping reliability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces an intermediary mechanism (interruptability holder tracking and scheduling coordination) between the interrupt remapping mechanism and NAPI processing mode. The VMM scheduler monitors which VCPU holds interruptability and coordinates scheduling decisions to prevent preemption during polling mode, allowing both mechanisms to work together without conflict

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent implements feedback by tracking the state of interruptability holders and using this information to adjust scheduling decisions. The VMM receives feedback about which VCPU is in polling mode and modifies scheduling behavior accordingly, preventing preemption until the polling mode ends

Inventive Principle:
Principle #23Feedback

2Productivity

If NAPI processing mode is used to improve network processing efficiency, then network processing efficiency is improved, but it conflicts with interrupt remapping mechanism causing failure

Engineering Contradiction:
Improvenetwork processing efficiencyVSAvoidinterrupt remapping reliability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The VMM scheduler acts as an intermediary that mediates between NAPI's polling mode requirements and interrupt remapping's interrupt delivery mechanism. By tracking interruptability holder state, the scheduler ensures interrupts are only delivered when appropriate, preventing the conflict while allowing NAPI to maintain its efficiency improvements

Inventive Principle:
Principle #24Intermediary (Mediator)

3Use of energy by moving object

If VCPU is scheduled out during interrupt processing, then CPU resource utilization is improved, but interrupt processing is delayed reducing I/O performance

Engineering Contradiction:
ImproveCPU resource utilizationVSAvoidinterrupt processing delay
Core Design Contradiction:
Use of energy by moving objectVSLoss of time

Solution Approach 1:

The patent makes the scheduling behavior dynamic by adjusting CPU utilization based on interruptability holder state. When a VCPU is holding interruptability (in polling mode), the scheduler dynamically prevents preemption to avoid delays. When no VCPU is holding interruptability, normal scheduling and preemption resume, maintaining CPU resource utilization efficiency

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS11269675B2Comprehensive scheduling method and device for problem of interruptability holder preemption
Publication Date: 2022.03.08 SHANGHAI JIAOTONG UNIV
  • US11269675B2 patent drawing
  • US11269675B2 patent drawing

AI summary

The present invention finds and defines a problem which possibly exists in an interrupt remapping mechanism under a virtual symmetric multiprocessing environment, i.e., a problem of Interruptability Holder Preemption (IHP). This problem causes the interrupt remapping mechanism to fail and reduces I/O performance of virtual machines. In order to solve the IHP problem, the present invention provides a proactive VCPU comprehensive scheduling method based on interruptability holder information. This method is based on Kernel-Based Virtual Machines (KVMs) which are widely used at present and paravirtualization network models thereof. By globally controlling and analyzing a running state of an interruptability holder and simultaneously considering global scheduling fairness of a system, a VCPU comprehensive scheduling method is established, which can effectively eliminate the IHP problem and obviously improve the I/O performance of the virtual machines.