Virtual CPU Resource Scheduling via Dynamic HLT Non-Exit Control
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In virtualization scenarios, frequent HLT operations by virtual CPUs lead to unnecessary consumption of physical CPU resources, resulting in decreased performance of virtual CPUs.
Innovation Solution
A resource scheduling method that dynamically regulates the HLT non-exit function of virtual CPUs based on their quantity in the run queue of a physical CPU, enabling the non-exit function when the virtual CPU monopolizes the physical CPU and disabling it when competing for resources.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If the HLT non-exit function is enabled for virtual CPUs, then the performance of exclusive virtual CPUs is improved, but physical CPU resources are unnecessarily consumed when multiple virtual CPUs compete for resources
Solution Approach 1:
The patent dynamically adjusts the HLT non-exit function state based on real-time monitoring of virtual CPU quantity in the run queue. When only one virtual CPU is present, the non-exit function is enabled to improve performance. When multiple virtual CPUs compete, the function is disabled to prevent resource waste. This dynamic adaptation resolves the contradiction between performance improvement and resource consumption.
Solution Approach 2:
The patent changes the operational parameter of the HLT non-exit function based on system conditions. By monitoring the quantity of virtual CPUs and adjusting the function's enable/disable state accordingly, the system optimizes the balance between virtual CPU performance and physical CPU resource consumption, resolving the technical contradiction.
2Adaptability or versatility
If the virtual machine frequently enters and exits states, then resource allocation flexibility is improved, but application performance of virtual CPU decreases due to excessive physical CPU consumption
Solution Approach 1:
The patent implements a feedback mechanism where the kernel scheduler continuously monitors the run queue status and adjusts the HLT non-exit function state accordingly. This feedback loop ensures that resource allocation flexibility is maintained through dynamic scheduling while preventing performance degradation caused by excessive HLT operations and physical CPU consumption.
Data Source
AI summary
Provided are a resource scheduling method and apparatus, where the resource scheduling method is applied to a physical machine, including: a kernel scheduler of the physical machine determining, based on a preset resource scheduling cycle, a quantity of virtual CPUs of a virtual machine running in a run queue of a target physical CPU; determining, based on the quantity of the virtual CPUs, a switch state of a non-exit function of a virtual CPU, and determining, based on the switch state, a target scheduling strategy of the virtual CPU; regulating, based on the target scheduling strategy, a running state of the virtual CPU of the virtual machine, thereby achieving timely shutdown of the non-exit function(s) of the virtual CPU(s), ensuring that unnecessary physical CPU resources are not consumed, as well as enabling the non-exit function(s) of the virtual CPU(s) to improve application performance of the virtual CPU(s).


