17
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

Consideration of real time GPU scheduling for XenGT in ...schd.ws/hosted_files/xensummit2016/c3/XenSummit2016_Simple... · Consideration of real time GPU scheduling for XenGT

  • Upload
    vungoc

  • View
    216

  • Download
    1

Embed Size (px)

Citation preview

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

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

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

1. Needs of virtualization in automotive systems(cont.)

Needs of virtualization

Can support Graphic consolidation

Use Shared graphics1)

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

2. Current state of GPU virtualization

Round-robin GPU scheduling

No Priority and no preemption

3 types of GPU virtualization solutions

5

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

buffer buffer Context switch

6

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

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

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

4. Experimental Results(cont.)

11

[terrain] has heavy

gpu context

Cluster App on DomU1

glmark2-es2 on DomU2

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)

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

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

Q&A

Sangyun Lee ([email protected])

Woosung Rain Kim([email protected])

16

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