Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embedded System - Sangyun Lee, LG Electronics


Published on

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.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

XPDS16: Consideration of Real Time GPU Scheduling of XenGT in Automotive Embedded System - Sangyun Lee, LG Electronics

  1. 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. 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. 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. 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. 5. 2. Current state of GPU virtualization  Round-robin GPU scheduling  No Priority and no preemption  3 types of GPU virtualization solutions 5
  6. 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. 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. 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. 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. 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
  11. 11. 4. Experimental Results(cont.) 11 [terrain] has heavy gpu context Cluster App on DomU1 glmark2-es2 on DomU2
  12. 12. Case1 Num(CPUs) Case2 Case3 Case4 Case5 Case6 Case7 Case8 Dom0 4(0-3) 4(0-3) 4(0-3) 4(0-3) 4,pin 2(0-3) 2,pin 1,pin DomU1 4(0-3) 2(0-3) 2(0-1) 1(1) 2(0-1) 2(0-3) 1(2) 1(1) DomU2 4(0-3) 2(0-3) 2(2-3) 2(2-3) 2(2-3) 2(0-3) 1(3) 2(2-3) 4. Experimental Results(cont.) 12 Test case : vCPUs allocation (w/ priority & period)
  13. 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. 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) 14
  15. 15. Demo video 15
  16. 16. Q&A Sangyun Lee ( Woosung Rain Kim( 16
  17. 17. Stand-alone Connected Integrated lSeparated Functionality lNo Information Sharing lStraightforward HMI* lCross-function Multiple Display lInformation Sharing lComplicated HMI lFree form Large Display lMultiple information Integrated lIntuitive HMI * HMI: Human Machine Interface Appendix. Automotive Cockpit Trend 17