This presentation will introduce simple real-time GPU scheduler of XenGT running on automotive embedded system and explain why the real-time GPU scheduling and preemption should be needed for automotive system.
The reference target of automotive system consists of two VMs(Virtual Machine) which run on XenGT. One is digital instrument cluster VM and the other is In-Vehicle Infotainment VM. In case of digital instrument cluster system, it must guarantee the real-time GPU rendering of speedometer application at least 60 fps. To do this, GPU scheduler should support a priority-based scheduling and preemption function. The presentation will cover the current status of GPU virtulaization and what is needed to meet the requirement of real-time GPU rendering in automotive system.
XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embedded System - Sangyun Lee, LG Electronics
1. Sangyun Lee* / Software Engineer
Woosung Rain Kim / Software Architect
Honggul Jun / Project Leader
LG Electronics, CTO
Consideration of real time GPU scheduling for XenGT
in automotive embedded systems
Xen Project Developer Summit
August 25-26, 2016
2. 1. Needs of virtualization in automotive systems
2. Current state of GPU virtualization
3. Simple Real-time GPU scheduler for Cluster VM on XenGT
4. Experimental results
5. Conclusion
Contents
2
3. 1. Needs of virtualization in automotive systems
Trends overview
Graphic consolidation of Cluster and IVI
Use multiple High resolution displays
Increase number of ECUs and H/W cost
Requirements for Graphic rendering performance
Cluster App should steadily run at 60 fps.
IVI App should run at 30 fps.
Consolidate
Cluster application IVI application
3
4. 1. Needs of virtualization in automotive systems(cont.)
Needs of virtualization
Can support Graphic consolidation
Use Shared graphics
1)
Technology
Can support High bandwidth for graphic sharing
Shared memory vs Ethernet
Can reduce Hardware cost ~30%
Share H/W resources between Cluster & IVI
1) GPU virtualization + graphic layer composition
Use case for consolidation of Cluster & IVI applications
4
5. 2. Current state of GPU virtualization
Round-robin GPU scheduling
No Priority and no preemption
3 types of GPU virtualization solutions
5
6. 2. Current state of GPU virtualization(cont.)
Backend-Frontend
vOpenGL / vGPU Driver
Mediated Pass-through
Driver
HW assisted GPU
virtualization
Dual GPU in SoC
GPU
Virtualization
Method
- Backend-Frontend type of
SW virtualization
- Mediated Pass-though type of
SW virtualization
- Direct Pass-through
type of HW assisted
virtualization
- Direct Pass-through
type w/o virtualization
- 2 physical GPUs
Technical
Approach
- API forwarding between
frontend and backend driver
- Controlled by backend driver
- Modified native GPU driver
- Pass-through graphic buffer
- Controlled by mediator driver
- Native GPU driver
- Initial setup for VM
- Controlled by each VM
- No GPU virtualization
- Dedicated GPU for VM
- Controlled by each VM
Simple
Diagram
GPU virtualization solutions
bufferbuffer
Context switch
6
7. 3. Simple Real-time GPU scheduler for Cluster VM on XenGT
Automotive virtualization architecture on XenGT
7
Reference : TimeGraph: GPU Scheduling for Real-Time Multi-Tasking Environments
8. 3. Simple Real-time GPU scheduler for Cluster VM on XenGT(cont.)
Basic mechanism for real-time GPU scheduling
High and low priority for vGPUs
Different period time for vGPUs
Preemption based on high priority of vGPU
8
9. 3. Simple Real-time GPU scheduler for Cluster VM on XenGT(cont.)
Key Factors to guarantee real-time graphic rendering for Cluster VM
Use priority based preemptive GPU scheduler
Support high-speed HW preemption with fine granularity
Support low context switching overhead between Cluster VM and IVI VM
Design Apps using light-weight GPU contexts
9
t2 > t1 ≈ t3 ≈ t4
10. Environmental Setup
CPU : i5-5250U CPU( x86_64, 4 cores, 1.6GHz)
GPU : Intel HD Graphics 6000
Xen : 4.6.0
Guest OS : Linux kernel 4.3.0-rc6-vgt+, Ubuntu 14.04 LTS
GPU Benchmarks: Qt Cluster app, glmark2-es2
DomU1(Cluster OS) has higher priority than DomU2(IVI OS)
4. Experimental Results
10
13. Case1
Priority/Period
Case2 Case3 Case4 Case5 Case6 Case7 Case8
DomU1 Low / 1ms Low / 6ms Low / 6ms High / 1ms High / 6ms High / 6ms High / 9ms High / 9ms
DomU2 Low / 1ms Low / 6ms Low / 1ms Low / 1ms Low / 6ms Low / 1ms Low / 9ms Low / 1ms
4. Experimental Results(cont.)
13
Test case : priority & period
14. Automotive virtualization is coming soon
“Grand ambitions of moving from a decentralized 50-ECU strategy to a single centralized
'super brain' may still be far off, but that journey is already starting today.(2016-7-7) “1)
Design consideration for Automotive virtualization system
Select a proper SoC
Support HW assisted virtualizations
Design HW partitions of CPU, Memory and I/O
CPU isolation vs CPU scheduling
Memory & I/O allocation
Design robust system for Safety
Consideration of real-time GPU scheduling
Support H/W priority and preemption features
Design applications using light-weight GPU context
Need of H/W assisted GPU virtualization
Directly Pass-through to the GPU
No need to develop frontend/backend GPU driver
5. Conclusion
1) https://www.linkedin.com/pulse/ecu-convergence-shake-up-infotainment-cluster-sourcing-andrew-hart
14