Implicit CPU Co-scheduling for Skew Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional co-scheduling techniques, such as strict and relaxed co-scheduling, become non-scalable and performance-impacting when dealing with a large number of virtual CPUs (VCPUs) in a single virtual machine (VM), leading to skew issues where VCPUs may run at different execution rates, violating guest operating system assumptions and potentially causing errors.
Innovation Solution
Implicit co-scheduling is achieved through proactive corunning techniques, including context migration and reactive skew limit methods, such as corun migration algorithms, corun bonus mechanisms, and non-linear skew catch-up algorithms, which aim to maintain VCPUs' parallel execution and reduce skew by migrating contexts and adjusting virtual time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If strict co-scheduling is used to reduce skew between VCPUs, then skew is reduced and guest OS assumptions are maintained, but performance deteriorates significantly when the number of VCPUs increases beyond 2-4
Solution Approach 1:
The patent applies preliminary action by proactively migrating VCPU contexts before skew becomes problematic. The hypervisor monitors VCPU execution progress and preemptively migrates VCPUs to different physical CPUs to maintain balanced execution, rather than waiting for skew to exceed thresholds and then forcing co-scheduling corrections.
Solution Approach 2:
The patent introduces context migration as an intermediary mechanism between VCPUs and physical CPUs. Instead of directly controlling VCPU execution timing through strict co-scheduling, the hypervisor uses context migration to indirectly balance VCPU progress by moving VCPU execution contexts across different physical CPU resources, allowing more flexible and scalable skew management.
2Productivity
If relaxed co-scheduling is used to improve performance by scheduling only subset of VCPUs, then performance improves, but skew control becomes insufficient and guest OS assumptions may be violated
Solution Approach 1:
The patent implements feedback by continuously monitoring VCPU execution progress through sampling and comparing timestamps. The hypervisor tracks the execution state of each VCPU and uses this feedback information to make informed migration decisions, dynamically adjusting VCPU scheduling to maintain skew within acceptable bounds while preserving performance.
Solution Approach 2:
The patent applies dynamics by making the VCPU scheduling approach adaptive rather than static. The system dynamically selects between relaxed co-scheduling and context migration strategies based on current system conditions, VCPU workload characteristics, and observed skew levels, allowing optimal performance while maintaining skew control.
3Quantity of substance
If the number of VCPUs in a VM is increased beyond 2-4, then computational capacity increases, but the performance impact of co-scheduling techniques becomes increasingly noticeable
Solution Approach 1:
The patent applies segmentation by dividing the management of multiple VCPUs into individual context migration decisions. Instead of managing all VCPUs as a group through traditional co-scheduling, the hypervisor independently monitors and migrates each VCPU context based on its specific execution progress, allowing scalable management of large numbers of VCPUs without the quadratic performance degradation of group-based co-scheduling.
Data Source
AI summary
Techniques for implicit coscheduling of CPUs to improve corun performance of scheduled contexts are described. One technique minimizes skew by implementing corun migrations, and another technique minimizes skew by implementing a corun bonus mechanism. Skew between schedulable contexts may be calculated based on guest progress, where guest progress represents time spent executing guest operating system and guest application code. A non-linear skew catch-up algorithm is described that adjusts the progress of a context when the progress falls far behind its sibling contexts.


