11

Click here to load reader

XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung

Embed Size (px)

DESCRIPTION

Samsung will present the challenges of creating a dual-Android platform on the Nexus 10 using Xen on ARM. Running two copies of Android is a strong use-case to satisfy the security needs for BYOD (Bring Your Own Device), where one Android can be designated as “work” and is secure and isolated from the users “home” Android. Achieving a good user-experience in both Android is essential for this technology to succeed commercially. The Nexus 10 has ARM Cortex A15 processors. For a good user-experience, both Android need high-performance GPU-accelerated graphics which demand high throughput and low latency. Samsung will discuss the issues encountered using Xen on a mobile device in this demanding use-case, and how the changes for Xen for mobile can be contributed into the community.

Citation preview

Page 1: XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung

Dual-AndroidTM on Nexus 10

10/21/2013 © Samsung Electronics 1

Samsung Research UK Presentation

for

Xen Developer Summit

24-25 Oct 2013

Edinburgh, UK

Page 2: XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung

2 © Samsung Electronics

Introduction

Feasibility: 2 copies of Android on Xen on ARM?

o Xen on mobile performance?

o Virtualized GPU required

Nexus 10 device used

o CPU: ARM Cortex A15 (x2)

o GPU: ARM Mali T604

o Memory available: 2GB RAM, plenty of Flash

o Screen resolution: 2560x1504

Page 3: XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung

3 © Samsung Electronics

Configuration

Software configuration – 2 VMs only

o DOM0 = 1st Android

o DOMU = 2nd Android

o Linux 3.4

o Android Jelly Bean 4.2

Xen 4.2 for ARM

o Builds on Xen on ARM for Cortex A9 work in Samsung

o Parallel development in Samsung HQ to community

Xen DOM0 kernel DOMU kernel

Memory 1GB RAM 1GB RAM

SMP Dual-core Dual-core Single-core

I/O Pass through PV Drivers

Page 4: XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung

Xen PVH Architecture

4 © Samsung Electronics

DOMU DOM0

Android

Jelly Bean 4.2

GPU

Mali T604

CPU 0

(Cortex A15)

Kernel

(PL1)

User

(PL0)

HYP

(PL2)

Android

Apps

Linux 3.4

HW CPU 1

(Cortex A15)

Android

Jelly Bean 4.2

Android

Apps

Linux 3.4

Xen on ARM

Rings Physical

Drivers

Back End

Drivers

Front End

Drivers

Display,

Touch

etc.

Page 5: XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung

5 © Samsung Electronics

Mobile Virtualization

I/O Challenges – Mobiles have ~50 device drivers

o Sensors: Touch, gyro, proximity, ambient light

o Media: Display, GPU, Camera, Audio, Video

o Connectivity: Charger, USB, WiFi, Bluetooth

User Switching

o Xen scheduler runs as normal.

o “Foreground” VM – user devices require arbitration driver in DOM0

• Display

• Touch

Display

Switch

Foreground VM

Page 6: XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung

6 © Samsung Electronics

Video

DOM0 – Blue Wallpaper DOMU – Orange Wallpaper

Switching icon

Demo video

o Switching between Android Icon or Volume key

o Angry Birds in DOMU Near-native performance of PV drivers

o Angry Birds in DOM0 and DOMU concurrently Two independent Android

o 3D Benchmark clip

Passthrough drivers PV Drivers

Page 7: XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung

7 © Samsung Electronics

Near-Native Performance Challenges

60 frames per second = 16.6ms per frame

o GPU renders each surface GPU composes the surfaces frame

Virtualized graphics options

o API Remoting done above GPU driver for chipset portability

Android JB has “butter smooth” technology

o Triple buffering

o Needs reliable Vsync interrupt Xen event channel stressed

o Deferred waiting using sync points & fences

15 0 30 45 60 time (ms)

Composition frame buffers

0

1

2

0

1

2 App frame buffers

Page 8: XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung

8 © Samsung Electronics

Results

0

20

40

60

80

100

120

140

160

0

10

20

30

40

50

60

70

Packets

/sec (

k)

FP

S

Dual-Android, GPU composition

DOM0 DOMU Packets/sec (k)

Page 9: XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung

9 © Samsung Electronics

Event Channel Under Stress

DOMU Vsync arrival time delta

16.67

0

5

10

15

20

25

30

35

10 11 12 13 14 15 16 17 18 19 20

De

lta

Tim

e (

ms

)

Benchmark Time (sec)

Some

missed

events

Page 10: XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung

10 © Samsung Electronics

Xen For Mobile

Multi-page ring

o Needed for throughput performance running benchmarks

o Ensure low-latency

Non-linear grant references

o Old grants are re-used. PV drivers assume linearity

RAM Allocation limit 512MB

o Buddy allocator is unable to allocate contiguous chunk of memory from the Domheap

memory

Per-VM interrupts unreliable when stressed

o Must ensure Vsync is received in DOMU with minimal latency

Contribution to community

o Samsung will work to share Xen changes with community

o Some code is proprietary

Page 11: XPDS13: Dual-Android on Nexus 10 - Lovene Bhatia, Samsung

11 © Samsung Electronics

Conclusion

Two Android can run with near-native graphics performance

Xen runs well on mobile devices

Using PV drivers, no major changes to Xen architecture required

Android is a trademark of Google Inc.

The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

ARM is a registered trademark of ARM Limited. Mali is a trademark of ARM Limited.

STAR WARS and related properties are trademarks in the United States and/or in other countries of Lucasfilm Ltd. and/or its affiliates. © 2012 Lucasfilm Ltd. All rights reserved.

Angry Birds is a trademark of Rovio Entertainment Ltd.