TimeGraph: GPU Scheduling for Real-Time Multi-Tasking Environments
Shinpei Kato*, Karthik Lakshmanan*, Raj Rajkumar*, and Yutaka Ishikawa** * Carnegie Mellon University ** The University of Tokyo
Real-Time Multi-Tasking Environments Shinpei Kato * , Karthik - - PowerPoint PPT Presentation
TimeGraph: GPU Scheduling for Real-Time Multi-Tasking Environments Shinpei Kato * , Karthik Lakshmanan * , Raj Rajkumar * , and Yutaka Ishikawa ** * Carnegie Mellon University ** The University of Tokyo USENIX Annual Technical Conference 2011
Shinpei Kato*, Karthik Lakshmanan*, Raj Rajkumar*, and Yutaka Ishikawa** * Carnegie Mellon University ** The University of Tokyo
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
NVIDIA GPU GeForce GTX 480
L2 Cache L1 L1 L1 L1 L1 L1 L1 Device Memory Host Memory CPU
48 480 0 simple simple co cores es
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011 7900 GTX 8800 GTX 9800 GTX GTX 280 GTX 285 GTX 480 GTX 580 E4300 E6850 Q9650 X7460 980 XE 200 400 600 800 1000 1200 1400 1600 2006/3/4 2007/12/14 2009/9/24 2011/7/6 GFLOPS NVIDIA GPU Intel CPU
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011 7900 GTX 8800 GTX 9800 GT GTX 280 GTX 285 GTX 480 GTX 580 E4300 E6850 Q9650 X7460 980XE 1 2 3 4 5 6 7 2006/3/4 2007/12/14 2009/9/24 2011/7/6 GFLOPS / Watt NVIDIA GPU Intel CPU
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
3-D Interface 3-D On-line Game Virtual Reality Computer Vision Scientific Simulation Autonomous Driving
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
CMD_HtoD CMD_HtoD CMD_LAUNCH CMD_DtoH
GPU Code Input Data
Host Memory
GPU Code Input Data
Device Memory
GPU Code Input Data
Host Memory
GPU Code Input Data
Device Memory
GPU Code Input Data
Host Memory
GPU Code
Device Memory
GPU Code Input Data
Host Memory Device Memory
GPU Code Output Data Output Data
copy
Input Data
copy
Output Data
copy
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
High-priority task Low-priority task GPU command GPU driver
Blocked Blocked
CPU GPU time time
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
0.2 0.4 0.6 0.8 1 NVIDIA Nouveau NVIDIA Nouveau GeForce 9500 GeForce GTX 285 Relative frame-rate to standalone Execute with Engine (low workload) Execute with Clearspd (high workload) Compete w/ Widget (low GPU workload) Compete w/ Bomb (high GPU workload)
NVIDIA proprietary driver Nouveau open-source driver
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
Applications OpenGL/CUDA Library User-space GPU Driver Submission Interface IRQ Handler Kernel-space GPU Driver
TimeGraph
GPU Command Scheduler GPU Reserve Manager GPU Command Profiler Graphics Processing Unit (GPU) GPU Command Queue Notification GPU resource control GPU exec. time prediction
Interrupt
GPU Command Group High- Priority
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
High-priority task Low-priority task GPU command GPU driver Interrupt CPU GPU time time
Prioritized correctly Overhead
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
High-priority task Low-priority task GPU command GPU driver Interrupt CPU GPU time time
Overhead reduced
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
CPU GPU Execution Budget C C P time time time
Enforced
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
CPU GPU Execution Budget C time time time
Predict Predict Enforced Enforced
C P
Predict Predict
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
– Nouveau open-source driver
– Phoronix Test Suite http://www.phoronix-test-suite.com/
– Gallium3D Demo Suite http://www.mesa3d.org/
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
10 20 30 40 50 60 OpenArena World of Padman Urban Terror Unreal Trounament 3-D Game Application Average frame-rate (fps) No Timing Support Priority Support Priority & Soft Reservation Support Priority & Hard Reservation Support No TimeGraph Support Priority Support (High Priority -> 3-D Game) Priority & PE Reservation Support (GPU Util. 10% -> Graphics Bomb) Priority & AE Reservation Support (GPU Util. 10% -> Graphics Bomb)
Frame Rate of 3-D Game competing with Graphics Bomb in background
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
40 80 120 160 200 20 40 60 80 100 120 Frames per Second Elapsed Time (Second) Engine #1 Engine #2 Engine #3 40 80 120 160 200 20 40 60 80 100 120 Frames per Second Elapsed Time (Second) Engine #1 Engine #2 Engine #3
No TimeGraph Support
40 80 120 160 200 20 40 60 80 100 120 Frames per Second Elapsed Time (Second) Engine #1 Engine #2 Engine #3
Priority Support (PRT) Priority Support (PRT) + Reservation Support (PE)
Widget Widget Widget Widget Widget Widget Widget Widget Widget
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
10 20 30 40 50 60 70 OpenArena World of Padman Urban Terror Unreal Trounament 3-D Game Application Average frame-rate (fps) No TimeGraph Support Priority Support (HT) Priority Support (PRT) Priority & Reservation Support (PRT & PE) Priority & Reservation Support (PRT & AE)
X server is assigned PRT policy
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
USENIX Annual Technical Conference 2011 – Shinpei Kato (CMU), June 15, 2011
0.01 0.1 1 10 100 NVIDIA Ours NVIDIA Ours NVIDIA Ours NVIDIA Ours NVIDIA Ours NVIDIA Ours NVIDIA Ours 16 x 16 32 x 32 64 x 64 128 x 128 256 x 256 512 x 512 1024 x 1024 Execution Time (ms)
Launch HtoD DtoH
NVIDIA GPU GeForce GTX 480 Matrix Multiplication * Available at http://www.contrib.andrew.cmu.edu/~shinpei/papers/ospert11.pdf