IP Library Granted Patent US 10,133,597
Granted Patent B2
US 10,133,597 · App. 14/779,234 · Granted Nov 20, 2018

Intelligent GPU scheduling in a virtualization environment

Inventors: Kun Tian (Shanghai, CN); Zhiyuan Lv (Beijing, CN); Yao Zu Dong (Shanghai, CN)
Assignee: Intel Corporation
G06F9/4881G06F9/455G06F9/45558G06F9/505G06F9/52G06T1/20G06F2009/4557G06F2009/45579
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 10,133,597
App. No.
14/779,234
Granted
Nov 20, 2018
Kind
B2
Abstract

Technologies for scheduling workload submissions for a graphics processing unit (GPU) in a virtualization environment include a GPU scheduler embodied in a computing device. The virtualization environment includes a number of different virtual machines that are configured with a native graphics driver. The GPU scheduler receives GPU commands from the different virtual machines, dynamically selects a scheduling policy, and schedules the GPU commands for processing by the GPU.

Claims (58)

1. A computing device for scheduling workload submissions for a virtualized graphics processing unit (GPU), the computing device comprising:

a processor;

a virtualization service to establish a virtualization environment comprising a plurality of virtual machines, each of the virtual machines comprising a graphics driver to communicate with the GPU and a plurality of command buffers to store GPU commands; and

a memory having a plurality of instructions stored therein that, when executed by the processor, causes the computing device to:

evaluate the GPU commands of all of the command buffers of all of the virtual machines;

dynamically select, in response to output of the evaluating of the GPU commands, a scheduling policy from a plurality of different scheduling policies;

switch the scheduling policy from a per-ring scheduling policy to a gang scheduling policy in response to detecting a cross-buffer dependency between two GPU commands that are in different command buffers of the same virtual machine;

schedule at least one of the GPU commands according to the gang scheduling policy; and

execute, by the GPU, the at least one of the GPU commands according to the gang scheduling policy.

2. The computing device of claim 1 , wherein the plurality of instructions further causes the computing device to:

scan the GPU commands of all of the command buffers of a virtual machine;

generate data indicative of cross-buffer dependencies between GPU commands in different command buffers of the same virtual machine; and

dynamically select the scheduling policy based on the data indicative of cross-buffer dependencies.

3. The computing device of claim 1 , wherein the plurality of instructions further causes the computing device to:

scan the GPU commands of all of the command buffers of a virtual machine, determine a command type for each of the GPU commands; and

dynamically select the scheduling policy for a GPU command based on the command type of the GPU command.

4. The computing device of claim 1 , wherein the plurality of instructions further causes the computing device to:

schedule GPU commands of one of the virtual machines according to the dynamically-selected scheduling policy; and

schedule GPU commands of another one of the virtual machines according to a different scheduling policy.

5. The computing device of claim 1 , wherein the plurality of instructions further causes the computing device to:

evaluate a GPU command of a different virtual machine; and

schedule the GPU command of the different virtual machine according to a scheduling policy that is not a gang scheduling policy.

6. The computing device of claim 1 , wherein each of the command buffers is embodied as a ring buffer, and wherein the plurality of instructions further causes the computing device to scan the GPU commands of a virtual machine for cross-ring synchronization primitives and select the scheduling policy for the GPU commands of the virtual machine based on the presence or absence of cross-ring synchronization primitives.

7. The computing device of claim 1 , wherein the plurality of instructions further causes the computing device to dynamically select different scheduling policies for different virtual machines based on the output of the evaluating of the GPU commands.

8. The computing device of claim 1 , wherein the plurality of instructions further causes the computing device to create a command database comprising data indicating dependencies between the command buffers of the virtual machine.

9. The computing device of claim 8 , wherein the plurality of instructions further causes the computing device to evaluate the command databases of all of the virtual machines and select the scheduling policy for at least one of the virtual machines based on the evaluating of all of the command databases.

10. The computing device of claim 1 , wherein the plurality of instructions further causes the computing device to:

scan the GPU commands of all of the command buffers of a virtual machine;

detect cross-buffer dependencies between GPU commands in different command buffers of the same virtual machine;

determine a frequency of occurrence of the cross-buffer dependencies over a period of time; and

change the scheduling policy based on the frequency of occurrence of the cross-buffer dependencies.

11. The computing device of claim 1 , wherein the plurality of instructions further causes the computing device to:

monitor for occurrences of cross-buffer dependencies across all of the command buffers of all of the virtual machines; and

change the scheduling policy from a per-ring policy to a gang policy if no cross-buffer dependencies are detected in a selected number of the command buffers.

12. A method for scheduling workload submissions for a virtualized graphics processing unit (GPU), the method comprising:

establishing a virtualization environment comprising a plurality of virtual machines, each of the virtual machines comprising a graphics driver to communicate with the GPU and a plurality of command buffers to store GPU commands;

evaluating the GPU commands of all of the command buffers of all of the virtual machines;

in response to output of the evaluating of the GPU commands, dynamically selecting a scheduling policy from a plurality of different scheduling policies;

switching the scheduling policy from a per-ring scheduling policy to a gang scheduling policy in response to detecting a cross-buffer dependency between two GPU commands that are in different command buffers of the same virtual machine;

scheduling at least one of the GPU commands according to the gang scheduling policy; and

executing, by the GPU, the at least one of the GPU commands according to the gang scheduling policy.

13. The method of claim 12 , comprising scanning the GPU commands of all of the command buffers of a virtual machine, generating data indicative of cross-buffer dependencies between GPU commands in different command buffers of the same virtual machine, and dynamically selecting the scheduling policy based on the data indicative of cross-buffer dependencies.

14. The method of claim 12 , comprising scanning the GPU commands of all of the command buffers of a virtual machine, determining a command type for each of the GPU commands, and dynamically selecting the scheduling policy for a GPU command based on the command type of the GPU command.

15. The method of claim 12 , comprising scheduling GPU commands of one of the virtual machines according to the dynamically-selected scheduling policy and scheduling GPU commands of another one of the virtual machines according to a different scheduling policy.

16. The method of claim 12 , comprising evaluating a GPU command of a different virtual machine and scheduling the GPU command of the different virtual machine according to a different scheduling policy that is not a gang scheduling policy.

17. The method of claim 12 , wherein each of the command buffers is embodied as a ring buffer, and the method comprises scanning the GPU commands of a virtual machine for cross-ring synchronization primitives and selecting the scheduling policy for the GPU commands of the virtual machine based on the presence or absence of cross-ring synchronization primitives.

18. The method of claim 12 , comprising dynamically selecting different scheduling policies for different virtual machines based on the output of the evaluating of the GPU commands.

19. One or more non-transitory machine readable storage media comprising a plurality of instructions stored thereon that in response to being executed result in a computing device scheduling workload submissions for a virtualized graphics processing unit (GPU), by:

establishing a virtualization environment comprising a plurality of virtual machines, each of the virtual machines comprising a graphics driver to communicate with the GPU and a plurality of command buffers to store GPU commands;

evaluating the GPU commands of all of the command buffers of all of the virtual machines;

in response to output of the evaluating of the GPU commands, dynamically selecting a scheduling policy from a plurality of different scheduling policies;

switching the scheduling policy from a per-ring scheduling policy to a gang scheduling policy in response to detecting a cross-buffer dependency between two GPU commands that are in different command buffers of the same virtual machine;

scheduling at least one of the GPU commands according to the gang scheduling policy; and

executing, by the GPU, the at least one of the GPU commands according to the gang scheduling policy.

20. The one or more non-transitory machine readable storage media of claim 19 , wherein the instructions when executed result in the computing device, for each of the virtual machines, creating a command database comprising data indicating dependencies between the command buffers of the virtual machine.

21. The one or more non-transitory machine readable storage media of claim 20 , wherein the instructions when executed result in the computing device evaluating the command databases of all of the virtual machines and selecting the scheduling policy for at least one of the virtual machines based on the evaluating of all of the command databases.

22. The one or more non-transitory machine readable storage media of claim 19 , wherein the instructions when executed result in the computing device scanning the GPU commands of all of the command buffers of a virtual machine, detecting cross-buffer dependencies between GPU commands in different command buffers of the same virtual machine, determining a frequency of occurrence of the cross-buffer dependencies over a period of time, and changing the scheduling policy based on the frequency of occurrence of the cross-buffer dependencies.

23. The one or more non-transitory machine readable storage media of claim 19 , wherein the instructions when executed result in the computing device monitoring for occurrences of cross-buffer dependencies across all of the command buffers of all of the virtual machines, and changing the scheduling policy from a per-ring policy to a gang policy if no cross-buffer dependencies are detected in a selected number of the command buffers.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 16, 2016
From: TIAN, KUN; LV, ZHIYUAN; DONG, YAO ZU
To: INTEL CORPORATION
Reel/Frame 038599/0637 →
Continuity (1)
Related Publication 20170123849A1 · May 4, 2017
Cited By (3)
US 12,333,336 US 12,360,809 US 12,632,289