SlideShare a Scribd company logo
Usage and Comparisons of Control Group in
Android AOSP: Marshmallow and Before
2016/1/11
Yoshi
State-of-the-Art
• In Seattle on August 20th, 2015
– Topic: big.LITTLE Support in Android
• Todd Kjos & Tim Murray from Google
Summary of LPC Android microconference http://lwn.net/Articles/657139/
Usage and Comparisons of Control Group in Android AOSP: Marshmallow and Before
Usage and Comparisons of Control Group in Android AOSP: Marshmallow and Before
Question 1: Differences between
/dev/cpuctl/ & /dev/cpuset/
52/(1024+52) ~= 5%
Only
bg_non_interactive
group is made
init.rc @ /alps/system/core/rootdir/
New cpuset cgroup in init.rc
AMS!!
Reply to Question 1
• Before Android M, we’ve already see
bg_non_interactive as a control group
– cpuctl is for “% of CPU Usage”
• Background = 5%
• Foreground = 95%
• In Android M, cpuset is another control group
for setting big.LITTLE
Question 2: Does Google Have
Similar Concepts of APO?
Similar to APO =
Interceptions in activityResumed and
activityPaused in AMS
Check Pause and Resume Methods
Reply to Q2:
Seems
nothing
special in M
Question 3: How CPUSET cgroup is
used?
Find CPUSETS
Find CPUSETS
android_os_Process_setProcessGroup
@base/core/jni/android_util_Process.cpp
set_cpuset_policy
@
system/core/libcutils/sched_policy.c
android_os_Process_setProcessGroup
@
base/core/jni/android_util_Process.cpp
setProcessGroup
@
base/core/java/android/os/Process.java
applyOomAdjLocked
@
base/services/core/java/com/android/server/am/ActivityManagerService.java
set_sched_policy
attachApplicationLocked
@
base/services/core/java/com/android/server/am/ActivityManagerService.java
... Several calls
Reply to Question 3
• Seems to be used when adjusting Out-of-
Memory adjustment
– One-time call, not resume/pause every time
Summary
• We went through how new CPUSET is used in
AOSP 6.0
• We compared the differences between Google’s
idea and APO
• Cgroups interface and functionalities are changed
by Google (Not presented in the slides)
• Partial conventional cgroups in Vanilla’s kernel
works
– Freezer & vanilla’s cpuset have been tested
– Why??
Ongoing
• TOSHIBA’s study on improving real-time tasks’
performance
– http://elinux.org/images/8/84/Real-
Time_Tasks_Partitioning_using_Cgroups.pdf
• Should we consider APO, EAS based on cgroup?
• AAF had a meeting for discussing cgroups
• SCHED_DEADLINE introduces constant bandwidth
server scheduling policy in Linux Kernel 3.14
– Android L uses 3.10
– Android M uses 3.18
Active Discussion in LPC Android u-
Conference (2015/8/20)
• Most of the EAS discussion focused on energy
– Interactive cpufreq governor in Android is mostly
focused on latency
• how does latency come into the picture and how can it be
controlled?
– The schedtune sysfs knob allows for similar boosting
» When an event occurs, Android user space could provide
some short-term boosting to improve latency response
– Riley Andrews from Google noted that the interactive cpufreq
governor gives this benefit without user space having to do
anything
– Lelli pointed out that the governor does it a bit blindly, so this
allows a more informed and focused response that could save
power
» I think the basic concept is the same as APO
http://lwn.net/Articles/657139/
Xiaomi’s Smart CGroup
• The new Smart CGroups will distribute the
CPU usage of process groups better between
cores: so instead of making one core do all the
work, the work is divided as balanced as
possible to make the processor run as efficient
as possible.
– http://en.miui.com/thread-35193-1-1.html
Reference
• Binder’s priority propagation
– https://github.com/keesj/gomo/wiki/AndroidSche
duling
• Summary of the LPC Android microconference
– http://lwn.net/Articles/657139/
• Google I/O 2015 on cgroup and big.LITTLE
– http://www.linuxplumbersconf.org/2015/ocw//sy
stem/presentations/3399/original/LPC-tkjos.pdf
BACKUP
Usage and Comparisons of Control Group in Android AOSP: Marshmallow and Before
Usage and Comparisons of Control Group in Android AOSP: Marshmallow and Before
Usage and Comparisons of Control Group in Android AOSP: Marshmallow and Before
Usage and Comparisons of Control Group in Android AOSP: Marshmallow and Before
Usage and Comparisons of Control Group in Android AOSP: Marshmallow and Before
Usage and Comparisons of Control Group in Android AOSP: Marshmallow and Before

More Related Content

PPT
Ticket Vending Machine
PDF
Las familias navarras, las que mas gastan en ocio, cultura y espectaculos. di...
PPTX
How developers can help save lives managing Asthma
PPT
Rewards as a Retention Framework
PPTX
DocOps — The Analytical Window to Your Customer’s Experience with Wade Clements
PPTX
Trabajofinaltitulacion
PPTX
Melisa
PDF
Sv forum mobile_sig_graham_aug2011
Ticket Vending Machine
Las familias navarras, las que mas gastan en ocio, cultura y espectaculos. di...
How developers can help save lives managing Asthma
Rewards as a Retention Framework
DocOps — The Analytical Window to Your Customer’s Experience with Wade Clements
Trabajofinaltitulacion
Melisa
Sv forum mobile_sig_graham_aug2011

Viewers also liked (17)

PPTX
15h31 h baumann funding
PPT
21 Punto Ley
PDF
Smart Technologies
PDF
Version control with git
PDF
Vishal gulati pdf
PDF
Java Generics - by Example
PPTX
Murray's Equality of the Sexes
PDF
Android Platform Debugging and Development
PDF
Actualising Actualising Make in India to Make in Karnataka
PPTX
Clinical case - Lowe syndrome
PDF
Swarm mode
DOC
Tim Oakley Resume
PDF
A Hands-on Introduction to Docker
PPTX
Plasma Arc Welding by Himanshu Vaid
PPT
História das Bibliotecas
PDF
Améliorez votre présence en ligne pour attirer vos clients
15h31 h baumann funding
21 Punto Ley
Smart Technologies
Version control with git
Vishal gulati pdf
Java Generics - by Example
Murray's Equality of the Sexes
Android Platform Debugging and Development
Actualising Actualising Make in India to Make in Karnataka
Clinical case - Lowe syndrome
Swarm mode
Tim Oakley Resume
A Hands-on Introduction to Docker
Plasma Arc Welding by Himanshu Vaid
História das Bibliotecas
Améliorez votre présence en ligne pour attirer vos clients
Ad

Similar to Usage and Comparisons of Control Group in Android AOSP: Marshmallow and Before (20)

PPTX
Scheduling techniques for reducing processor energy use in MacOS
PDF
SC17 Panel: Energy Efficiency Gains From HPC Software
PDF
A Comparative Evaluation of the GPU vs The CPU for Parallelization of Evolut...
PDF
A Comparative Evaluation of the GPU vs The CPU for Parallelization of Evoluti...
PDF
A COMPARATIVE EVALUATION OF THE GPU VS. THE CPU FOR PARALLELIZATION OF EVOLUT...
PPTX
Renesas DevCon 2010: Starting a QT Application with Minimal Boot
PDF
Shorten Device Boot Time for Automotive IVI and Navigation Systems
PDF
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
PDF
Simulation of Process Scheduling Algorithms
PDF
Time Critical Multitasking For Multicore Microcontroller Using Xmos® Kit
PDF
TIME CRITICAL MULTITASKING FOR MULTICORE MICROCONTROLLER USING XMOS® KIT
PDF
Title: TIME CRITICAL MULTITASKING FOR MULTICORE MICROCONTROLLER USING XMOS® KIT
PDF
Time Critical Multitasking For Multicore Microcontroller Using Xmos® Kit
PDF
A framework for optimization of the boot time on embedded linux environment w...
PDF
Cse viii-advanced-computer-architectures-06cs81-solution
PDF
Time critical multitasking for multicore
PDF
Optimizing Linux Kernel for Real-time Performance On Multi-Core Architecture
PPTX
Large Model support and Distribute deep learning
PDF
LCA14: LCA14-205: Optimizing SQLite for Android mobile
PPTX
Module 1-1.pptx on the Operating Systems
Scheduling techniques for reducing processor energy use in MacOS
SC17 Panel: Energy Efficiency Gains From HPC Software
A Comparative Evaluation of the GPU vs The CPU for Parallelization of Evolut...
A Comparative Evaluation of the GPU vs The CPU for Parallelization of Evoluti...
A COMPARATIVE EVALUATION OF THE GPU VS. THE CPU FOR PARALLELIZATION OF EVOLUT...
Renesas DevCon 2010: Starting a QT Application with Minimal Boot
Shorten Device Boot Time for Automotive IVI and Navigation Systems
SOLUTION MANUAL OF OPERATING SYSTEM CONCEPTS BY ABRAHAM SILBERSCHATZ, PETER B...
Simulation of Process Scheduling Algorithms
Time Critical Multitasking For Multicore Microcontroller Using Xmos® Kit
TIME CRITICAL MULTITASKING FOR MULTICORE MICROCONTROLLER USING XMOS® KIT
Title: TIME CRITICAL MULTITASKING FOR MULTICORE MICROCONTROLLER USING XMOS® KIT
Time Critical Multitasking For Multicore Microcontroller Using Xmos® Kit
A framework for optimization of the boot time on embedded linux environment w...
Cse viii-advanced-computer-architectures-06cs81-solution
Time critical multitasking for multicore
Optimizing Linux Kernel for Real-time Performance On Multi-Core Architecture
Large Model support and Distribute deep learning
LCA14: LCA14-205: Optimizing SQLite for Android mobile
Module 1-1.pptx on the Operating Systems
Ad

More from Yoshi Shih-Chieh Huang (7)

PPTX
Architectural modeling
PPTX
Flash knowledge
PPTX
Short intro to project butter
PPTX
Attackboard slides dac12-0605
PPTX
On the End-to-End Traffic Prediction in the On-Chip Networks
PPTX
PPTX
Introduction to amazon web service (clean)
Architectural modeling
Flash knowledge
Short intro to project butter
Attackboard slides dac12-0605
On the End-to-End Traffic Prediction in the On-Chip Networks
Introduction to amazon web service (clean)

Recently uploaded (20)

PPTX
Welding lecture in detail for understanding
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
Geodesy 1.pptx...............................................
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
PDF
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPTX
OOP with Java - Java Introduction (Basics)
Welding lecture in detail for understanding
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
Geodesy 1.pptx...............................................
Embodied AI: Ushering in the Next Era of Intelligent Systems
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
IOT PPTs Week 10 Lecture Material.pptx of NPTEL Smart Cities contd
bas. eng. economics group 4 presentation 1.pptx
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
Automation-in-Manufacturing-Chapter-Introduction.pdf
TFEC-4-2020-Design-Guide-for-Timber-Roof-Trusses.pdf
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
CH1 Production IntroductoryConcepts.pptx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Model Code of Practice - Construction Work - 21102022 .pdf
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
OOP with Java - Java Introduction (Basics)

Usage and Comparisons of Control Group in Android AOSP: Marshmallow and Before