You are on page 1of 17

Powerdebugging inside Linaro

Amit Kucheria <amit.kucheria@linaro.org> Tech Lead Power Management Working Group


https://wiki.linaro.org/WorkingGroups/PowerManagement/

Linaro?
Source Consolidation Patches Architecture consolidation Optimizations Tools Evaluation builds

PM WG: Story so far...


1 full Linaro cycle Focus on consolidation and tools Some kernel work...
Feature Export clock tree to debugfs Cpufreq driver Cpuidle driver
CPU Hotplug

Freescale i.MX51 Y Y WIP


NA

TI OMAP3

TI OMAP4

Samsung Orion Y Y WIP


Y

ST-E UX8500 Y Y N
Y

Y WIP Y
NA

Y WIP N
Y

PM WG: Story so far...

Some tools work


Powertop Powerdebug Thermal management CPU Hotplug

And some experiments


Survey

Problem Statement
Power Manager
User or Kernel (TBD) In kernel upstream

Thermal Manager

Device Drivers

CPUidle
Governor

DVFS / CPUfreq
Policy

In dev for upstream To be designed

Generic Kernel (/kernel, /driver, etc)

LDM

Runtime PM

platform_device
pdata

CPU hotplug

PM QoS

LDM suspend hooks


(begin/end, prepare/finish, enter)

PM runtime hooks
(suspend, resume, idle)

CPU hotplug

CPUidle

CPUfreq

PM Core SOC specific - SRAM idle - WFI Kernel (/arch/arm, /arch/arm/mach)


- suspend and idle entry

SOC PM layer
SoC abstraction
(if platform supported) devlat tput Freq MPU lat

opp

Clock fwk
Hardware

clockdomain SOC HW

powerdomain

Regulator PMIC

Problem statement

Complexity is growing fast and it is hard to tune a product for optimum battery life

Good old days


User

Device Drivers LDM


Kernel

LDM
suspend hooks SRAM idle, WFI

Clock Framework
Hardware

SoC HW

PMIC

Generic Vendor code code

P V .f
User

Device Drivers LDM


Kernel

LDM
suspend hooks SRAM idle, WFI

CPUfreq

Clock Framework SoC HW PMIC

Hardware

Generic Vendor code code

Corralling regulators, idle states and offering latency guarantees


User

Device Drivers LDM


Kernel

PM_QoS

LDM
suspend hooks SRAM idle, WFI

CPUidle

CPUfreq

Clock Framework SoC HW

Regulator Framework PMIC

Hardware

Generic Vendor code code

Many hands make light work


User

CPU hotplug

Device Drivers LDM LDM


suspend hooks SRAM idle, WFI

PM_QoS

Kernel

CPUidle

CPUfreq

Clock Framework SoC HW

Regulator Framework PMIC

Hardware

Generic Vendor code code

Abstracting clock- & power-domain handling for peripherals


User

CPU hotplug Runtime PM

Device Drivers LDM LDM


suspend hooks SRAM idle, WFI

PM_QoS

Kernel

CPUidle

CPUfreq

Clock Framework SoC HW

Regulator Framework PMIC

Hardware

Generic Vendor code code

Performance points of devices


User

CPU hotplug Runtime PM

Device Drivers LDM LDM


suspend hooks SRAM idle, WFI

PM_QoS

Kernel

CPUidle

CPUfreq

OPP

Clock Framework

Regulator Framework PMIC

Hardware

SoC HW

Generic Vendor code code

Warmth at last!
User

Thermal manager Vendor policy

CPU hotplug Runtime PM Thermal Framework CPUfreq OPP

Device Drivers LDM LDM


suspend hooks SRAM idle, WFI

PM_QoS

Kernel

CPUidle

Clock Framework

Regulator Framework PMIC

Hardware

SoC HW

Generic Vendor code code

Focus areas for Linaro PM WG


User

Thermal manager Vendor policy

CPU hotplug Runtime PM

Device Drivers LDM LDM


suspend hooks SRAM idle, WFI

PM_QoS

Kernel

CPUidle

CPUfreq

OPP

Clock Framework

powerdebug

Regulator Framework PMIC

Hardware

SoC HW
Linaro focus

Generic Vendor code code

Remember!
Power Manager
User or Kernel (TBD) In kernel upstream

Thermal Manager

Device Drivers

CPUidle
Governor

DVFS / CPUfreq
Policy

In dev for upstream To be designed

Generic Kernel (/kernel, /driver, etc)

LDM

Runtime PM

platform_device
pdata

CPU hotplug

PM QoS

LDM suspend hooks


(begin/end, prepare/finish, enter)

PM runtime hooks
(suspend, resume, idle)

CPU hotplug

CPUidle

CPUfreq

PM Core SOC specific - SRAM idle - WFI Kernel (/arch/arm, /arch/arm/mach)


- suspend and idle entry

SOC PM layer
SoC abstraction
(if platform supported) devlat tput Freq MPU lat

opp

Clock fwk
Hardware

clockdomain SOC HW

powerdomain

Regulator PMIC

We're just getting started...

https://wiki.linaro.org/WorkingGroups/PowerManagement/ http://git.linaro.org amit.kucheria@linaro.org

You might also like