lca13: android kernel upstreaming: overview & status

33
Android Kernel Upstreaming: Overview & Status John Stultz [email protected] http://www.linaro.org March 5 th 2013 Linaro Connect Asia (based off of my Android Builders Summit talk + updates!)

Upload: linaro

Post on 29-Nov-2014

511 views

Category:

Technology


4 download

DESCRIPTION

Resource: LCA13 Name: Android Kernel Upstreaming: Overview & Status Date: 05-03-2013 Speaker: John Stultz

TRANSCRIPT

Page 1: LCA13: Android Kernel Upstreaming: Overview & Status

Android Kernel Upstreaming: Overview & Status

John [email protected]

http://www.linaro.org

March 5th 2013Linaro Connect Asia

(based off of my Android Builders Summit talk + updates!)

Page 2: LCA13: Android Kernel Upstreaming: Overview & Status

2

● Overview of the Android™ kernel patch set

● Status of what has made it upstream and what hasn't

● Why upstreaming is important● Planning & discussion items

What I'll cover

Page 3: LCA13: Android Kernel Upstreaming: Overview & Status

3

Overview of Android Patch Set

Page 4: LCA13: Android Kernel Upstreaming: Overview & Status

4

Carving up the Bugdroid

https://blueprints.launchpad.net/linux-linaro/+spec/linaro-kernel-android-upstreaming

Page 5: LCA13: Android Kernel Upstreaming: Overview & Status

5

Core Platform Components

https://blueprints.launchpad.net/linux-linaro/+spec/android-core-platform-upstreaming

Page 6: LCA13: Android Kernel Upstreaming: Overview & Status

6

● Binder● Ashmem● Logger● Monotonic event timestamps

Core Platform Components

Page 7: LCA13: Android Kernel Upstreaming: Overview & Status

7

Power/Performance Improvements

Page 8: LCA13: Android Kernel Upstreaming: Overview & Status

8

Power/Performance Improvements

● Wakelock infrastructure● Alarm-dev● low-memory-killer● Interactive cpufreq governor

Page 9: LCA13: Android Kernel Upstreaming: Overview & Status

9

Platform Debugging Features

https://blueprints.launchpad.net/linux-linaro/+spec/android-debugging

Page 10: LCA13: Android Kernel Upstreaming: Overview & Status

10

Platform Debugging Features

● Android Gadget Driver (for ADB)● FIQ Debugger● ram_console/persistent_ram● Keyreset driver● ETM/ETB improvements● Goldfish emulator support

Page 11: LCA13: Android Kernel Upstreaming: Overview & Status

11

Networking Changes

Page 12: LCA13: Android Kernel Upstreaming: Overview & Status

12

Networking Changes

● Paranoid networking framework● Netfilter changes● Bluetooth improvements● bcmhd driver

Page 13: LCA13: Android Kernel Upstreaming: Overview & Status

13

Graphics Infrastructure

https://blueprints.launchpad.net/linux-linaro/+spec/android-graphics-upstreaming

Page 14: LCA13: Android Kernel Upstreaming: Overview & Status

14

Graphics Infrastructure

● ION● Sync

Page 15: LCA13: Android Kernel Upstreaming: Overview & Status

15

Misc Items

https://blueprints.launchpad.net/linux-linaro/+spec/android-nonesential-platform-upstreaming

Page 16: LCA13: Android Kernel Upstreaming: Overview & Status

16

Misc Items

● Android battery meta-driver● Input drivers & tweaks● Switch class● Timed gpio● MMC tweaks● Smaller changes all over

Page 17: LCA13: Android Kernel Upstreaming: Overview & Status

17

Deprecated features

Page 18: LCA13: Android Kernel Upstreaming: Overview & Status

18

Deprecated features

● pmem● earlysuspend● apanic● yaffs2

Page 19: LCA13: Android Kernel Upstreaming: Overview & Status

19

Upstream Status

Page 20: LCA13: Android Kernel Upstreaming: Overview & Status

20

Already upstream

● Wakelocks● Monotonic event stamps● Ram_console/persistent_memory

● via pstore/ramoops

● Switch class● via ExtConn driver*

Page 21: LCA13: Android Kernel Upstreaming: Overview & Status

21

In the staging directory

● Binder

● Ashmem

● Logger

● Low-memory-killer

● Alarm-dev

● Android-gadget-driver (as CCG driver)*

● Timed GPIO

● Sync driver (as of last night!) queued for 3.10

Page 22: LCA13: Android Kernel Upstreaming: Overview & Status

22

In development

● FIQ Debugger● Integrated w/ KDB, Portions upstream

● Key-reset-driver● Some functionality merged in 3.9

● Low-memory-killer● Mempressure cgroup

● Ashmem unpinning functionality● Volatile ranges

● Goldfish platform support

Page 24: LCA13: Android Kernel Upstreaming: Overview & Status

24

Upstream Status

Page 25: LCA13: Android Kernel Upstreaming: Overview & Status

25

Out of tree stats (3.8)

● ~361 patches● Diffstat:

● 253 files changed, 27321 insertions(+), 511 deletions(-)

Generated with git diff -dirstat=lines,0,cumulative

17.3%: drivers/usb/gadget/

16.5%: net/netfilter/

11.5%: arch/arm/

11.1%: drivers/gpu/ion/

7.3%: drivers/input/

6.6%: include/linux/

4.9%: drivers/base/

4.0%: drivers/cpufreq/

3.2%: drivers/net/ppp/

2.6%: drivers/power/

1.5%: kernel/

1.4%: drivers/mmc/

1.3%: drivers/staging/android/

1.3%: drivers/switch/

1.2%: drivers/char/

1.0%: Documentation/

7.3%: Other

Page 26: LCA13: Android Kernel Upstreaming: Overview & Status

26

Generated with: https://github.com/johnstultz-work/git-plot-tools.git

Page 27: LCA13: Android Kernel Upstreaming: Overview & Status

27

Google isn't standing still

● Fair amount of recent development around:● ION (gpu)● Sync● Interactive cpufreq gov (cpufreq)● Android battery driver (power)● Netfilter

Page 28: LCA13: Android Kernel Upstreaming: Overview & Status

28

Why does upstreaming matter?

Page 29: LCA13: Android Kernel Upstreaming: Overview & Status

29

Code forks aren't bad

● The Android patch set is in effect a fork of the Linux kernel

● Kernel code forks are common, and actually good.● PREEMPT_RT● 4g/4g split● Most filesystems

● GPL allows for eventual re-merging, or at least learning from the fork

Page 30: LCA13: Android Kernel Upstreaming: Overview & Status

30

Community forks are less positive

● ARM SoCs almost exclusively focused on Android● Very large community of developers ● Writing drivers with out-of-tree dependencies

● Android kernel became standard for ARM BSPs● Many non-android platforms ship with

Android kernel– WebOS– FirefoxOS– Ubuntu Phone

Page 31: LCA13: Android Kernel Upstreaming: Overview & Status

31

Increasing collaboration

● Getting the functionality upstream allows for more collaboration

● If you're an Android system developer, the upstream kernel community is your community● It's like a family, for good and bad

Page 32: LCA13: Android Kernel Upstreaming: Overview & Status

32

Join in!http://www.linaro.org

[email protected]

*Android is a trademark of Google Inc.