Session ID: HKG18-210
Session Name: HKG18-210 - Product codeline optimization
Speaker: Daniel Lezcano
Track: Mobile
★ Session Summary ★
The Android Open Source Project has integrated the Energy Aware Scheduler. In this context, it is important we continue the process of identifying the bottleneck in the kernel and optimize the scheduler. However the power management covers different areas and the scheduler may compete in the decisions for optimum energy saving / performance trade-off. We need to identify those conflicting interactions and improve the collaboration between the PM subsystems and the scheduler.
---------------------------------------------------
★ Resources ★
Event Page: http://connect.linaro.org/resource/hkg18/hkg18-210/
Presentation: http://connect.linaro.org.s3.amazonaws.com/hkg18/presentations/hkg18-210.pdf
Video: http://connect.linaro.org.s3.amazonaws.com/hkg18/videos/hkg18-210.mp4
---------------------------------------------------
★ Event Details ★
Linaro Connect Hong Kong 2018 (HKG18)
19-23 March 2018
Regal Airport Hotel Hong Kong
---------------------------------------------------
Keyword: Mobile
'http://www.linaro.org'
'http://connect.linaro.org'
---------------------------------------------------
Follow us on Social Media
https://www.facebook.com/LinaroOrg
https://www.youtube.com/user/linaroorg?sub_confirmation=1
https://www.linkedin.com/company/1026961
2. Introduction
● Big Little architecture and DynamiQ
● 3D constraints: latency vs throughput vs power
management
● Automated test suite : regressions detected as soon as
possible
● Improvements identification
● Kernel changes tracking : Vanilla and AOSP
3. Continuous integration
● Automatic process:
○ Merge of different branches
○ Compilation
○ Testing + measurements
○ Report
○ Data presentation
● Integration process triggered only if there is a change
in one of the branches
4. Continuous integration - branches merge
● Devs add their branches in the configuration file
● All branches are monitored
● Any change triggers a merge
● Merges are automatic, except in case of conflict
○ Reuse-Recorded-Resolution
○ Manual resolution
● One branch as the base branch on a platform reference
● One branch for the missing hardware support of the platform reference
● N branches from developers
6. Continuous integration - LAVA + WA
● LAVA jobs triggered by the git tree update
● Compiles and boot
● Runs a Workload automation
● Do energy measurements
● Report back build results
● Report back offending changes in branch
● Report back the data
● Data mining with LISA
● Graphical presentation
7. Continuous integration - LAVA + WA
git.linaro.org
Workload Automation
pmwg.validation.linaro.org
Agenda Energy
Compilation
Boot
Post build processing
Post test processing
LISA Script
ci.linaro.org
qa-reports.linaro.org
8. Continuous integration - Status
Feature Status Comment
Branches merge script
Notification after build / boot / tests CT&T
Automatic branch change detection from LAVA CT&T
Workload automation agenda
Energy measurement
Build / boot / test report CT&T
Data mining with LISA Available scripts ?
Graphical web presentation
Data permission access - critical Access PMWG only - feature exists
9. Test cases
● Homescreen
○ Small task placement on an idle system
● Exoplayer audio
○ Small task placement on an idle system
● Exoplayer video
○ Balanced workload with multiple threads
● Camera
○ High workload with multiple threads
● UIbench
○ Responsiveness, task placement and optimal DVFS
● Temple run [2]
○ Task placement one big thread, several small threads
● Beach buggy blitz
○ Startup screen is CPU and graphic intensive, check DVFS adjustment
speed
10. Test cases
● Vellamo
○ Check CPUs synergy is not degraded
● UI responsiveness benchmark
○ Check user experience is not degraded
A more detailed summary at https://goo.gl/Hx6UWB
● Traces, statistics, metrics defined there (WIP)
11. Identifying glitches
● Grouping observations based on test cases
○ https://goo.gl/U54BU7 (WIP)
● Dhrystone
○ Little CPUs finish before big CPUs due to thermal throttling
○ That is not always the case; to be double checked
● Exoplayer audio and homescreen
○ Big CPUs used instead of the little ones
● Sounds like we have conflicting objectives between what
the EAS solves and what schedtune tries to improve
○ Prefer_idle option will always favorize the big CPUs, for better user
experience but at the cost of extra energy consumption
12. Identifying improvements
● Energy calculation optimization
● Select candidate CPUs on cluster basis
● Consider RT pressure for candidate selection and energy
calculation
● Consider boost margin for candidate selection and energy
calculation
● Handle task placement when task utilization = 0
● Consider coordinate axis and origin with schedtune
● Optimized thermal mitigation with combo cooling device
13. Identifying improvements
● Anticipated wakeup
○ In order to reduce the latencies, the CPU is wake up a bit before the
expected wake up, the exit latency of the idle state won’t impact the
user experience
● Per task latency
○ Give the opportunity to the userspace to set for a specific task the
desired latency
○ This information can be reuse in the scheduler to optimize the task
placement
● Schedtune
○ The above two improvements should solve a big part of what
schedtune wants to solve
○ Less applications in top-app and foreground ?
○ What about SCHED_IDLE / SCHED_BATCH ?
14. Upstreaming
● Keep track of the different changes
● Identify the ones to go for android-4.9
● Identify the ones to be merged upstream
● Group already existing patches from Linaro and ARM
15. Upstreaming
● Thermal
○ Hi960 thermal driver backported from mainline
○ Legacy thermal driver to be removed
○ play_idle() series backported from mainline
● Cpuidle
○ Asymmetric CPUs support backport from mainline
○ Legacy cpuidle driver to be removed
● Ahead of upstream merge
○ Idle injection thermal driver ported to Android 4.9
○ Combo cooling device being ported to Android 4.9 (WIP)
16. ARM collaboration
● ARM / Linaro collaboration web page : https://goo.gl/jebWXR
● Chris Redpath / Daniel Lezcano contact points for collaboration
● Patrick Bellasi to help for existing tests and LISA scripts ?
● Any branches we can bring to the continuous integration tree ?
● Please Linaro and ARM Cc’ed for the emails so we can keep track of what is
happening
● Mailing list for EAS development: eas-dev@lists.linaro.org
● Lightning meeting every week - status sent