3. ASIA 2013 (LCA13)
www.linaro.org
Status
Current Linaro kernel uses old HMP patches
New patches designed to not be HMP specific
Patches under internal review and tests
Currently under review and test by ARM and Linaro
1st results are aligned with old HMP patches
Available on git.linaro.org
See patches section
Few use cases need to be improved
See open issues section
4. ASIA 2013 (LCA13)
www.linaro.org
Policy
As simple as 3 rules
Pack small tasks on LITTLE cores at wake up
Balance long running tasks in priority
Choose core with best capacity
5. ASIA 2013 (LCA13)
www.linaro.org
Patches : some fixes
Fix nr_busy_cpus
Remove spurious trig of Idle Load Balance
https://lkml.org/lkml/2013/2/21/53
v5 under preparation
Fix load_avg with -rt task
Fix the load average tracking if only -rt tasks run on a core
https://lkml.org/lkml/2013/2/13/71
Fix active migration
Fix the target CPU of active load balance if only 1 task run on a core
https://lkml.org/lkml/2013/2/12/158
6. ASIA 2013 (LCA13)
www.linaro.org
Patches : load balance (1/2)
Pack small tasks
Pack small tasks on few cores (A7 for b.L)
http://lwn.net/Articles/528883/
v3 under test
Use per task load average
Weight the task contribution with the run time
Only nice priority before
Use LB_MIN feature
Balance long running tasks in priority
PST takes care of small task
7. ASIA 2013 (LCA13)
www.linaro.org
Patches : load balance (2/2)
Migrate on CPU with highest capacity
Use CPU with highest capacity
Tune sched_domain for b.L
Tunings for b.L platform
Reduce Periodic load balance for responsiveness
Scaling Invariance
Ensure load invariance across core and running frequency
Not available yet
8. ASIA 2013 (LCA13)
www.linaro.org
Open issue: nice priority - load_avg_contrib
Nice priority define a “runtime slice allocation”
load_avg_contrib is %runnable x nice_prio
nice priority -20 @ 10% : 887
nice priority 0 @ 100% : 1024
nice priority 10 @ 100% : 110
What is the best place for :
A long running task with low priority ?
AsyncTask in Android as an example
A short running tasks with high priority ?
9. ASIA 2013 (LCA13)
www.linaro.org
A15 cluster
capacity of 2882
CPU0
Open issue: Offloading to A7
Use A7 instead of overloading A15
Load balance puts more tasks on A15 and let an A7 idle
Example with sysbench and 5 threads
T0
CPU1
T1
T2
A7 cluster
capacity of 1883
CPU3
T3
CPU4
T4
CPU2
10. ASIA 2013 (LCA13)
www.linaro.org
Pack small tasks in details
Pack small tasks
on LITTLE core for big.LITTLE
Powertop results for Android MP3 playback
A15 Cluster CPU0 CPU1
WFI 0% 0%
C1 99,4% 99,9%
A7 Cluster CPU2 CPU3 CPU4
WFI 0,2% 0,1% 0,0%
C1 80,1% 97,6% 98,2%
11. ASIA 2013 (LCA13)
www.linaro.org
Use best core in details
Use the core with highest capacity
Periodic load balance focuses long running tasks
Ensure long running tasks are balanced in priority
A15
A15
A7
A7
A7
12. ASIA 2013 (LCA13)
www.linaro.org
Bbench example
Page rendering example with audio playback
WebViewCore-Thread
SurfaceFlinger
Android.browser
Audio Threads
A15
A15
A7
A7
A7
A15
A15
A7
A7
A7
13. More about Linaro Connect: www.linaro.org/connect/
More about Linaro: www.linaro.org/about/
More about Linaro engineering: www.linaro.org/engineering/
ASIA 2013 (LCA13)