Power Management beyond the CPU
Amit Kucheria
Power Management Working Group
Linaro Connect, Hong Kong
1st
June 2012
The power guzzlers...
Internet Phone
Video streaming
Angry birds
GPS navigation
0
100
200
300
400
500
600
700
800
900
GPS
Audio
Wifi
Display
CPU
Use case
Powerconsumption(mW)
Concepts: quick overview
●
Clock trees [clock framework]
●
Power supplies [regulator framework]
●
Idle management [cpuidle framework]
●
Active CPU power/performance management
[cpufreq framework]
●
Active device power/performance management
[devfreq framework]
●
Dynamic device power management [runtime PM
framework]
●
Constraints [pm-qos framework]
Use case walkthrough
MP3 playback
mp3 playback: Assumptions
Music on MMC/SDcard
Decoding on ARM
mp3 playback: Simplified HW blocks
DRAM ARM
MMC/SD
Buffer
mp3
Audio
codec
SoC
mp3 playback: Flow
mp3
DRAM ARM
MMC/SD
File
Cache
BufferPCM
frames
DMA
decode
Audio
codec
SoC
mp3 playback: SW optimisations
Entire file read into main memory
●
Run ARM cores at low frequency [cpufreq]
●
Turn off MMC [runtime pm hooks in mmc driver]
●
What is turned off?
●
Clocks immediately
●
Regulators turned off lazily
●
Ensure system doesn't idle too long [cpuidle]
●
Register a latency constraint [pm-qos]
mp3 playback: SW optimisations
Decode mp3 to PCM
●
Decoded samples in main memory
●
Turn off ARM core, no more processing necessary
[cpuidle]
●
Peripherals may still be awake
mp3 playback: SW optimisations
DMA from main memory to some FIFO
●
e.g. FIFO on audio codec or some buffered serial port
●
RAM can be put in self-refresh
●
FIFO is large (few 100ms)
mp3 playback: SW optimisations
Buffer drives Codec while entire SoC is in very
low-power state
●
Timer wakes up DMA thread just before buffer
runs out
Conclusions
●
ARM power consumption is a small component in
a typical usecase
●
Surrounding peripherals need to be power-
managed too
●
Linux has frameworks to help with this
●
Runtime PM
●
PM-QoS
●
devfreq
Thank You

Q2.12: Power Management Beyond the CPU

  • 1.
    Power Management beyondthe CPU Amit Kucheria Power Management Working Group Linaro Connect, Hong Kong 1st June 2012
  • 2.
    The power guzzlers... InternetPhone Video streaming Angry birds GPS navigation 0 100 200 300 400 500 600 700 800 900 GPS Audio Wifi Display CPU Use case Powerconsumption(mW)
  • 3.
    Concepts: quick overview ● Clocktrees [clock framework] ● Power supplies [regulator framework] ● Idle management [cpuidle framework] ● Active CPU power/performance management [cpufreq framework] ● Active device power/performance management [devfreq framework] ● Dynamic device power management [runtime PM framework] ● Constraints [pm-qos framework]
  • 4.
  • 5.
    mp3 playback: Assumptions Musicon MMC/SDcard Decoding on ARM
  • 6.
    mp3 playback: SimplifiedHW blocks DRAM ARM MMC/SD Buffer mp3 Audio codec SoC
  • 7.
    mp3 playback: Flow mp3 DRAMARM MMC/SD File Cache BufferPCM frames DMA decode Audio codec SoC
  • 8.
    mp3 playback: SWoptimisations Entire file read into main memory ● Run ARM cores at low frequency [cpufreq] ● Turn off MMC [runtime pm hooks in mmc driver] ● What is turned off? ● Clocks immediately ● Regulators turned off lazily ● Ensure system doesn't idle too long [cpuidle] ● Register a latency constraint [pm-qos]
  • 9.
    mp3 playback: SWoptimisations Decode mp3 to PCM ● Decoded samples in main memory ● Turn off ARM core, no more processing necessary [cpuidle] ● Peripherals may still be awake
  • 10.
    mp3 playback: SWoptimisations DMA from main memory to some FIFO ● e.g. FIFO on audio codec or some buffered serial port ● RAM can be put in self-refresh ● FIFO is large (few 100ms)
  • 11.
    mp3 playback: SWoptimisations Buffer drives Codec while entire SoC is in very low-power state ● Timer wakes up DMA thread just before buffer runs out
  • 12.
    Conclusions ● ARM power consumptionis a small component in a typical usecase ● Surrounding peripherals need to be power- managed too ● Linux has frameworks to help with this ● Runtime PM ● PM-QoS ● devfreq
  • 13.