IP Library Granted Patent US 9,632,808
Granted Patent B2
US 9,632,808 · App. 14/273,022 · Granted Apr 25, 2017

Implicit co-scheduling of CPUs

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,632,808
App. No.
14/273,022
Granted
Apr 25, 2017
Kind
B2
Abstract

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.

Claims (36)

1. A method for managing skew between a plurality of virtual CPUs assigned to a virtual machine to execute threads of the virtual machine, the virtual machine being supported by a computer system having multiple physical processors (PCPUs), the method comprising:

for each thread of the virtual machine, reducing a virtual time of the thread by a corun bonus, the virtual time being an accumulation of real time of executing the thread as modified by a weight assigned to the thread and the corun bonus being a measure of a number of virtual CPUs assigned to the virtual machine that are running on different PCPUs; and

granting execution priority to one of the threads that has the lowest virtual time.

2. The method of claim 1 , wherein an amount of corun bonus is normalized by an amount of a CPU entitlement associated with a virtual CPU.

3. The method of claim 1 , further comprising:

calculating a skew between a first virtual CPU and a second virtual CPU based on a difference in progress of the first and second virtual CPUs, wherein progress of a virtual CPU is updated based on a measure of time during which that virtual CPU is executing guest code; and

performing a scheduling operation on the first virtual CPU based at least in part on the calculated skew.

4. The method of claim 3 , wherein performing the scheduling operation on the first virtual CPU based at least in part on the calculated skew further comprises descheduling the first virtual CPU from executing based on the skew between the first virtual CPU and the second virtual CPU exceeding a threshold amount of skew.

5. The method of claim 3 , further comprising:

calculating a metric as a function of the calculated skew; and

adjusting the progress of the second virtual CPU by an amount that is a function of the metric, adjusting the progress being performed only when the calculated skew exceeds a threshold amount of skew.

6. A non-transitory computer-readable storage medium comprising instructions that, when executed in a computing device, manage skew between a plurality of virtual CPUs assigned to virtual machine to execute threads of the virtual machine, the virtual machine being supported by a computer system having multiple physical processors (PCPUs), by performing the steps of:

for each thread of the virtual machine, reducing a virtual time of the thread by a corun bonus, the virtual time being an accumulation of real time of executing the thread as modified by a weight assigned to the thread and the corun bonus being a measure of a number of virtual CPUs assigned to the virtual machine that are running on different PCPUs; and

granting execution priority to one of the threads that has the lowest virtual time.

7. The non-transitory computer-readable storage medium of claim 6 , wherein an amount of corun bonus is normalized by an amount of a CPU entitlement associated with a virtual CPU.

8. The non-transitory computer-readable storage medium of claim 6 , wherein the instructions, when executed in the computing device, perform the steps comprising:

calculating a skew between a first virtual CPU and a second virtual CPU based on a difference in progress of the first and second virtual CPUs, wherein progress of a virtual CPU is updated based on a measure of time during which that virtual CPU is executing guest code; and

performing a scheduling operation on the first virtual CPU based at least in part on the calculated skew.

9. The non-transitory computer-readable storage medium of claim 8 , wherein the instructions, when executed in the computing device, perform the steps comprising:

calculating a metric as a function of the calculated skew; and

adjusting the progress of the second virtual CPU by an amount that is a function of the metric, the adjusting of the progress being performed only when the calculated skew exceeds a threshold amount of skew.

10. A computer system, the computer system comprising:

a memory; and

a plurality of physical processors (PCPUs)

on which a plurality of virtual CPUs are running, the virtual CPUs being assigned to a virtual machine to execute threads of the virtual machine, the virtual machine being supported by the plurality of PCPUs,

wherein at least one of the plurality of PCPUs is programmed to carry out the steps of:

for each thread of the virtual machine, reducing a virtual time of the thread by a corun bonus, the virtual time being an accumulation of real time of executing the thread as modified by a weight assigned to the thread and the corun bonus being a measure of a number of virtual CPUs assigned to the virtual machine that are running on different PCPUs; and

granting execution priority to one of the threads that has the lowest virtual time.

11. The computer system of claim 10 , wherein an amount of corun bonus is normalized by an amount of a CPU entitlement associated with a virtual CPU.

12. The computer system of claim 10 , wherein the at least one of the plurality of PCPUs is further programmed to carry out the steps of:

calculating a skew between a first virtual CPU and a second virtual CPU based on a difference in progress of the first and second virtual CPUs, wherein progress of a context is updated based on a measure of time during which that context is executing guest code; and

performing a scheduling operation on the first virtual CPU based at least in part on the calculated skew.

13. The computer system of claim 12 , wherein performing the scheduling operation on the first virtual CPU based at least in part on the calculated skew further comprises descheduling the first virtual CPU from executing based on the skew between the first virtual CPU and the second virtual CPU exceeding a threshold amount of skew.

14. The computer system of claim 12 , wherein the at least one of the plurality of PCPUs is further programmed to carry out the steps of:

calculating a metric as a function of the calculated skew; and

adjusting the progress of the second virtual PCU by an amount that is a function of the metric, the adjusting of the progress being performed only when the calculated skew exceeds a threshold amount of skew.

Assignments (1)
CHANGE OF NAME Recorded Apr 15, 2024
From: VMWARE, INC.
To: VMWARE LLC
Reel/Frame 067102/0314 →