Accelerated Development with Linaro
 Infrastructure, Validation, and Optimization

                Jim Huang ( 黃敬群 )
     Developer, Linaro : <jim.huang@linaro.org>
       Developer, 0xlab : <jserv@0xlab.org>
                   May 18, 2011
Agenda

 Infrastructure
  Linaro – Accelerating Product Development
   Working Groups
   Evaluation Builds
 Validation
 Optimization
Open Source Revolution

 Billions of consumer devices rely on open source software
    Google Android, Apple iOS, RIM, Windows Mobile, ...
 OEMs and ODMs want chip vendors to offer the best open
  source support for their SoCs and to avoid low level
  fragmentation speeding their time to market
    Example: Qualcomm/QuIC
 This necessitates working together – kernel consolidation,
  aligned investment, defragmentation, aligned
  upstreaming, open source leadership
About Linaro
    “to make it easier and quicker for ARM partners to
     “to make it easier and quicker for ARM partners to
    deploy the latest technology into optimized Linux
     deploy the latest technology into optimized Linux
    based products”
     based products”

 Founded in June 2010
 Members align their open source strategy with Linaro
 Provides shared Leadership in open source
What does Linaro do?
                               Delivers a optimized code base
                                 – Kernel and vital middleware
                                 – Applied across all member SoCs
                               Tools
                                 – Best compiler, debugger, profiler
                               Enabled on the latest SoCs
                                 – Cortex A8, A9, & A15 processors
                               Delivered upstream
                                 – Evaluation builds for key
                                   distributions – Android, Chrome,
                                   Ubuntu, Other Linux
                                 – Test & Validation framework
                                   for member SoCs
                                                         OEM
                                                         Linu
                                                         x
Linaro – NOT a distribution
 Infrastructure
  Linaro – Accelerating Product Development
   Working Groups
   Evaluation Builds
 Validation
 Optimization
Where does Linaro fit?
               Community (upstream)
                  Aligned upstream
                  investment


                                     Distribution
                                     s take from
                Linaro               upstream
  Common
  Linux Core
  Software
                      Evaluation
                      Builds

                         OEM
                         Linux
                         Downstream
Engineering units
Optimization & Innovation                              SoC support and
                                                        SoC support and
 Optimization & Innovation
                                                       optimization
                                                        optimization


 Working Groups                   Platform
                                 Engineering
 Kernel Consolidation
  Kernel Consolidation
                                    Validation &
                                   Benchmarking
       Toolchain
        Toolchain
                                  Evaluation Builds
                                   Android, Ubuntu,
       Graphics
        Graphics                    Chrome, IVI…


  Power Management
   Power Management               Infrastructure
                                  Release management
           :
      Multimedia
      Multimedia

                             Validation, benchmarking,
                              Validation, benchmarking,
                             release management
                              release management
Working with Linaro
 Linaro kernel becomes members most advanced
 Vendor BSP and Linaro landing team engineers work
  together
 Get latest software on latest SoCs with upstream support
WGs: Alignment, Optimization,
           Leadership
                             Optimization & Innovation
                              Optimization & Innovation
 Aligned investment: boot,
  power mgmt, Float, kernel…     Working Groups
 Open source Leadership         Kernel Consolidation
                                  Kernel Consolidation

 Latest software on latest HW        Toolchain
                                       Toolchain
                                       Graphics
                                        Graphics

                                  Power Management
                                   Power Management
                                           :
                                      Multimedia
                                      Multimedia
Linaro eval builds & test farms
                                                               OEM
                                                               Linux


 Linaro evaluation builds push
  latest software into distributions        Platform
                                           Engineering
                                                  g
                                            Validation &
 Validation test farms monitor             Benchmarking
  improvements in software quality            Evaluation
                                                Builds
                                             Android, Ubuntu

 Benchmarking ensures continuous           Infrastructur
                                                  e
  improvements in performance                   Release
                                              management

                                       Validation & Eval builds
                                        Validation & Eval builds
Linaro Evaluation Android Build
 Reduced TTM with streamlined integration
 Increased optimisation and benchmarking
 Validation on multiple hardware

                             Ubuntu
                              Ubuntu
              Android
               Android


            Linaro kernel
             Linaro kernel      HW
                                 HW
             (Common)
               (Common)        Pack
                                Pack

   Early Android for latest member      Test & Validation farm
   hardware with Linaro optimisations   Benchmarking
Evaluation Builds

 Builds of key distributions incorporating
  Linaro’s technology

 Initial Evaluation builds (11.05)
  – Android 2.3 Gingerbread
  – Ubuntu 11.04
Benefits of Evaluation Builds

 Demonstrate the output of the working groups
 Real-life product-quality distributions for Linaro
  performance and regression testing
 Closer to understanding and delivering tangible
  deliverables that shorten the TTM
 Serve as basis for OEM/ODM commercialization
 Validate members silicon and reference designs
 Attract distribution owners to Linaro
 Attract a wider community audience
Linaro 2011
11.05: Working Group Deliverables

 Toolchain
    Produce the best all-round v7 GCC compiler
        EEMBC DENBench/ConsumerBench, SPEC CPU2006
    linaro-gcc 4.5 & 4.6, linaro-gdb 7.2, cortexstrings 1.0
    ARM-enhance/port qemu, libunwind, ltrace, gold, libgc
 Kernel
    Linaro Linux and Linaro Android trees
    Devicetree evaluation kernels
    GPU and MM implementation guidelines
 Power Management
    Standard ARM-enhanced management mechanisms
    Hotplug, thermal and clock/regulator tree common interfaces
    Allow custom engines to encode policies
        Tools to demonstrate interfaces and debug behaviors
11.05: Working Group Deliverables

 Multimedia
    A multimedia optimization workbench
    ARM-enhanced JPEG and VP8 decoding
    OpenMAX-standardized components
    Free content for benchmarks and testing

 Graphics
    OpenGL ES backends for Cairo, Skia, meegotouch-
     compositor, chromium-wm and compiz
    Work with vendors and upstream to document a common
     ARM-standard acceleration framework
Quality & Performance
 Open source code has limited testing as it is
  created
 Linaro needs to quantitatively measure its
  performance & quality over time
  – Benchmarks
  – Power consumption under system loads
  – System stability
 Linaro engineering needs improved tools
  – Smoke testing
  – Regression testing
  – Automated testing with real distributions
 Infrastructure
  Linaro – Accelerating Product Development
   Working Groups
   Evaluation Builds
 Validation
 Optimization
Linaro Test & Validation
 We have started to develop our test & validation
  farm to benefit members & our own engineering
 Populated by member hardware
 Goals
  – Linaro 11.05
     • Running automated daily builds and smoke tests
     • Running daily benchmarks
     • At least 2 member boards
  – Linaro 11.11 and beyond
     •   Automated performance tests on release and daily builds
     •   Automated stability tests
     •   Hardware from all members
     •   Web dashboard available
Automated Validation for Android

Android benchmark running on LAVA.            Android support on LAVA
Automated Validation flow includes             https://wiki.linaro.org/Platform/Validation/LAVA
from deploy, then reboot, testing,
                                                 Android related commands in LAVA:
benchmark running, and result submit.             * deploy_linaro_android_image
                                                  * boot_linaro_android_image
                                                  * test_android_basic
                                                  * test_android_monkey
                                                  * test_android_0xbench
                                                  * submit_results_on_host




                                       https://code.launchpad.net/~linaro-validation/lava/trunk
    Reference hardware:
    Beagleboard xM         https://wiki.linaro.org/JeremyChang/Sandbox/LavaAndroidValidation
    Pandaboard                                 Android-dev branch:
                                                  lp:~jeremychang/lava/android-support
0xbench: comprehensive open source
             benchmark suite for Android
• A set of system utilities for
  Android to perform
  comprehensive system
  benchmarking
   •   Dalvik VM performance
   •   OpenGL|ES performance
   •   Android Graphics framework
       performance
   •   I/O performance
   •   Connectivity performance
   •   Micro-benchmark: stanard C library,
       system call, latency, Java
       invocation, ...
: 0xBench
Collect and Analyze
results in the cloud
 Infrastructure
  Linaro – Accelerating Product Development
   Working Groups
   Evaluation Builds
 Validation
 Optimization
Android Platform Team

    https://wiki.linaro.org/Platform/Android

    Scope
     Provide Linaro optimized builds of the Android software
      stack
     Help consolidate and improve the Android ecosphere
     Extend Android validation

    Goals
     Reduce ODM/OEM time-to-market
     Upstream Linaro optimizations
11.05 Accomplishments
     25 patches sent upstream, 9 merged

      – Merged Sample
          bionic: Add ARM optimized strcpy()
          libpng: use GCC visibility to reduce shared library size
          Allow building toolchain without target gdb alternatively.
       Accepted Sample
          libpixelflinger: Add ARM NEON optimized scanline_t32cb16
              Dramtically improve boot animation performance




https://review.source.android.com/#dashboard,1002471
Development Aspects
 ARM specific optimizations
   multi-core for bionic libc, dalvik, skia, blitter,
    RenderScript, WebKit, etc.
 Figure out hotspot for further improvements
  and and apply strong validation
 SoC vendor HAL/enhancement consolidation=
 code size, performance, debugging facility,
  introducing latest technologies
   Recompiled by Linaro Toolchain for Android (2011.04), skia obtains
    10% performance gain. Up to 150% for specialized routines
11.05 Accomplishments
   
       Created daily Android builds




Released 11.04 Panda-LEB build
https://android-build.linaro.org/builds/~linaro-android/leb-panda/
How Linaro delivers value
 Linaro provides a common platform for member SoCs
  and Linux distributions
   Enables SiP, Distribution, OEM, ODM to focus on value add
    rather than common core code
 Multiplier effect of multiple member resources working
  on common code base
 Access to test & validation framework
 Support and services
 Faster time to market for end products
Roadmap
 Work with distributions to become the enablement
  channel for member SoCs
 Work with ARM to deliver open source support for
  Cortex A15
 Continue to work on ARM generic SoC optimization
  including toolchain support, NEON and SMP issues
 Support new market segments
   DTV/STB, Server
Benefits to everyone
 SoC Vendors
   – Linaro makes Linux BSPs easier to create and support
   – Ability to accelerate TTM for new products through
     working inside Linaro before SoC release
 Distributions
   – Linaro enables rapid support for multiple SoCs for new
     distribution versions
 OEM/ODM
   – Software and tool reuse between projects
   – Faster TTM
 Carriers & Segment Leaders
   – Linaro enables a standardized ARM Linux core for segment
     specific distributions (mobile, STB, embedded etc.)
Summary

 Linaro is a not for profit software engineering
  company owned by ARM, IBM and SoC vendors
   Delivers core Linux technology for ARM SoCs
   Faster product TTM through better integration of ARM
    with upstream & distributions
   Members get significant advantages of belonging to
    Linaro: Multiplier effect, latest software on latest SoCs,
    defragmentation & happy customers
www.linaro.org

Accelerated Android Development with Linaro

  • 1.
    Accelerated Development withLinaro Infrastructure, Validation, and Optimization Jim Huang ( 黃敬群 ) Developer, Linaro : <jim.huang@linaro.org> Developer, 0xlab : <jserv@0xlab.org> May 18, 2011
  • 2.
    Agenda  Infrastructure Linaro – Accelerating Product Development  Working Groups  Evaluation Builds  Validation  Optimization
  • 3.
    Open Source Revolution Billions of consumer devices rely on open source software  Google Android, Apple iOS, RIM, Windows Mobile, ...  OEMs and ODMs want chip vendors to offer the best open source support for their SoCs and to avoid low level fragmentation speeding their time to market  Example: Qualcomm/QuIC  This necessitates working together – kernel consolidation, aligned investment, defragmentation, aligned upstreaming, open source leadership
  • 4.
    About Linaro “to make it easier and quicker for ARM partners to “to make it easier and quicker for ARM partners to deploy the latest technology into optimized Linux deploy the latest technology into optimized Linux based products” based products”  Founded in June 2010  Members align their open source strategy with Linaro  Provides shared Leadership in open source
  • 5.
    What does Linarodo?  Delivers a optimized code base – Kernel and vital middleware – Applied across all member SoCs  Tools – Best compiler, debugger, profiler  Enabled on the latest SoCs – Cortex A8, A9, & A15 processors  Delivered upstream – Evaluation builds for key distributions – Android, Chrome, Ubuntu, Other Linux – Test & Validation framework for member SoCs OEM Linu x Linaro – NOT a distribution
  • 6.
     Infrastructure Linaro – Accelerating Product Development  Working Groups  Evaluation Builds  Validation  Optimization
  • 7.
    Where does Linarofit? Community (upstream) Aligned upstream investment Distribution s take from Linaro upstream Common Linux Core Software Evaluation Builds OEM Linux Downstream
  • 8.
    Engineering units Optimization &Innovation SoC support and SoC support and Optimization & Innovation optimization optimization Working Groups Platform Engineering Kernel Consolidation Kernel Consolidation Validation & Benchmarking Toolchain Toolchain Evaluation Builds Android, Ubuntu, Graphics Graphics Chrome, IVI… Power Management Power Management Infrastructure Release management : Multimedia Multimedia Validation, benchmarking, Validation, benchmarking, release management release management
  • 9.
    Working with Linaro Linaro kernel becomes members most advanced  Vendor BSP and Linaro landing team engineers work together  Get latest software on latest SoCs with upstream support
  • 10.
    WGs: Alignment, Optimization, Leadership Optimization & Innovation Optimization & Innovation  Aligned investment: boot, power mgmt, Float, kernel… Working Groups  Open source Leadership Kernel Consolidation Kernel Consolidation  Latest software on latest HW Toolchain Toolchain Graphics Graphics Power Management Power Management : Multimedia Multimedia
  • 11.
    Linaro eval builds& test farms OEM Linux  Linaro evaluation builds push latest software into distributions Platform Engineering g Validation &  Validation test farms monitor Benchmarking improvements in software quality Evaluation Builds Android, Ubuntu  Benchmarking ensures continuous Infrastructur e improvements in performance Release management Validation & Eval builds Validation & Eval builds
  • 12.
    Linaro Evaluation AndroidBuild  Reduced TTM with streamlined integration  Increased optimisation and benchmarking  Validation on multiple hardware Ubuntu Ubuntu Android Android Linaro kernel Linaro kernel HW HW (Common) (Common) Pack Pack Early Android for latest member Test & Validation farm hardware with Linaro optimisations Benchmarking
  • 13.
    Evaluation Builds  Buildsof key distributions incorporating Linaro’s technology  Initial Evaluation builds (11.05) – Android 2.3 Gingerbread – Ubuntu 11.04
  • 14.
    Benefits of EvaluationBuilds  Demonstrate the output of the working groups  Real-life product-quality distributions for Linaro performance and regression testing  Closer to understanding and delivering tangible deliverables that shorten the TTM  Serve as basis for OEM/ODM commercialization  Validate members silicon and reference designs  Attract distribution owners to Linaro  Attract a wider community audience
  • 15.
  • 16.
    11.05: Working GroupDeliverables  Toolchain  Produce the best all-round v7 GCC compiler  EEMBC DENBench/ConsumerBench, SPEC CPU2006  linaro-gcc 4.5 & 4.6, linaro-gdb 7.2, cortexstrings 1.0  ARM-enhance/port qemu, libunwind, ltrace, gold, libgc  Kernel  Linaro Linux and Linaro Android trees  Devicetree evaluation kernels  GPU and MM implementation guidelines  Power Management  Standard ARM-enhanced management mechanisms  Hotplug, thermal and clock/regulator tree common interfaces  Allow custom engines to encode policies  Tools to demonstrate interfaces and debug behaviors
  • 17.
    11.05: Working GroupDeliverables  Multimedia  A multimedia optimization workbench  ARM-enhanced JPEG and VP8 decoding  OpenMAX-standardized components  Free content for benchmarks and testing  Graphics  OpenGL ES backends for Cairo, Skia, meegotouch- compositor, chromium-wm and compiz  Work with vendors and upstream to document a common ARM-standard acceleration framework
  • 18.
    Quality & Performance Open source code has limited testing as it is created  Linaro needs to quantitatively measure its performance & quality over time – Benchmarks – Power consumption under system loads – System stability  Linaro engineering needs improved tools – Smoke testing – Regression testing – Automated testing with real distributions
  • 19.
     Infrastructure Linaro – Accelerating Product Development  Working Groups  Evaluation Builds  Validation  Optimization
  • 20.
    Linaro Test &Validation  We have started to develop our test & validation farm to benefit members & our own engineering  Populated by member hardware  Goals – Linaro 11.05 • Running automated daily builds and smoke tests • Running daily benchmarks • At least 2 member boards – Linaro 11.11 and beyond • Automated performance tests on release and daily builds • Automated stability tests • Hardware from all members • Web dashboard available
  • 21.
    Automated Validation forAndroid Android benchmark running on LAVA. Android support on LAVA Automated Validation flow includes https://wiki.linaro.org/Platform/Validation/LAVA from deploy, then reboot, testing, Android related commands in LAVA: benchmark running, and result submit. * deploy_linaro_android_image * boot_linaro_android_image * test_android_basic * test_android_monkey * test_android_0xbench * submit_results_on_host https://code.launchpad.net/~linaro-validation/lava/trunk Reference hardware: Beagleboard xM https://wiki.linaro.org/JeremyChang/Sandbox/LavaAndroidValidation Pandaboard Android-dev branch: lp:~jeremychang/lava/android-support
  • 22.
    0xbench: comprehensive opensource benchmark suite for Android • A set of system utilities for Android to perform comprehensive system benchmarking • Dalvik VM performance • OpenGL|ES performance • Android Graphics framework performance • I/O performance • Connectivity performance • Micro-benchmark: stanard C library, system call, latency, Java invocation, ...
  • 23.
  • 24.
  • 26.
     Infrastructure Linaro – Accelerating Product Development  Working Groups  Evaluation Builds  Validation  Optimization
  • 27.
    Android Platform Team https://wiki.linaro.org/Platform/Android  Scope  Provide Linaro optimized builds of the Android software stack  Help consolidate and improve the Android ecosphere  Extend Android validation  Goals  Reduce ODM/OEM time-to-market  Upstream Linaro optimizations
  • 28.
    11.05 Accomplishments  25 patches sent upstream, 9 merged – Merged Sample  bionic: Add ARM optimized strcpy()  libpng: use GCC visibility to reduce shared library size  Allow building toolchain without target gdb alternatively.  Accepted Sample  libpixelflinger: Add ARM NEON optimized scanline_t32cb16  Dramtically improve boot animation performance https://review.source.android.com/#dashboard,1002471
  • 29.
    Development Aspects  ARMspecific optimizations  multi-core for bionic libc, dalvik, skia, blitter, RenderScript, WebKit, etc.  Figure out hotspot for further improvements and and apply strong validation  SoC vendor HAL/enhancement consolidation=  code size, performance, debugging facility, introducing latest technologies  Recompiled by Linaro Toolchain for Android (2011.04), skia obtains 10% performance gain. Up to 150% for specialized routines
  • 30.
    11.05 Accomplishments  Created daily Android builds Released 11.04 Panda-LEB build https://android-build.linaro.org/builds/~linaro-android/leb-panda/
  • 31.
    How Linaro deliversvalue  Linaro provides a common platform for member SoCs and Linux distributions  Enables SiP, Distribution, OEM, ODM to focus on value add rather than common core code  Multiplier effect of multiple member resources working on common code base  Access to test & validation framework  Support and services  Faster time to market for end products
  • 32.
    Roadmap  Work withdistributions to become the enablement channel for member SoCs  Work with ARM to deliver open source support for Cortex A15  Continue to work on ARM generic SoC optimization including toolchain support, NEON and SMP issues  Support new market segments  DTV/STB, Server
  • 33.
    Benefits to everyone SoC Vendors – Linaro makes Linux BSPs easier to create and support – Ability to accelerate TTM for new products through working inside Linaro before SoC release  Distributions – Linaro enables rapid support for multiple SoCs for new distribution versions  OEM/ODM – Software and tool reuse between projects – Faster TTM  Carriers & Segment Leaders – Linaro enables a standardized ARM Linux core for segment specific distributions (mobile, STB, embedded etc.)
  • 34.
    Summary  Linaro isa not for profit software engineering company owned by ARM, IBM and SoC vendors  Delivers core Linux technology for ARM SoCs  Faster product TTM through better integration of ARM with upstream & distributions  Members get significant advantages of belonging to Linaro: Multiplier effect, latest software on latest SoCs, defragmentation & happy customers
  • 35.