logo资料库

基于linux操作系统的电源管理省电.pdf

第1页 / 共26页
第2页 / 共26页
第3页 / 共26页
第4页 / 共26页
第5页 / 共26页
第6页 / 共26页
第7页 / 共26页
第8页 / 共26页
资料共26页,剩余部分请下载后查看
Slide 1
Slide 2
Slide 3
Slide 4
Slide 5
Slide 6
Slide 7
Slide 8
Slide 9
Slide 10
Slide 11
Slide 12
Slide 13
Slide 14
Slide 15
Slide 16
Slide 17
Slide 18
Slide 19
Slide 20
Slide 21
Slide 22
Slide 23
Slide 24
Slide 25
Slide 26
Power saving in Linux devices Chris Simmonds 2net Limited Class 5.5 Embedded Systems Conference UK. 2009 Copyright © 2009, 2net Limited
Overview  Power saving is important because  Extends battery life  Conforms to regulations for consumer and office equipment  Micro power management  Reduce clock speeds, sleep during idle - little impact on overall performance  Macro power management  Suspend and hibernate Chris Simmonds 2net Ltd 2
Micro power management  Techniques that have low latency  i.e. Low overhead in time and power switching from one state to another  CPUFreq  Scale core clock frequency dependant on load  Dynatick (Tickless operation)  Fewer timer interrupts, more time sleeping  CPUIdle  Deeper sleep when idle Chris Simmonds 2net Ltd 3
CPUFreq  Requires chip support to set core frequency  Need to know latency (overhead) of changing frequency  Policy set by “governor”  Typically:  Increase frequency as processor load increases  Reduce frequency when load drops Chris Simmonds 2net Ltd 4
CPUFreq governors powersave - always select the lowest frequency performance - always select the highest frequency ondemand - change frequency based on utilisation: if the CPU is idle < 20% of the time set the frequency to the maximum; if idle >=30% drop the frequency down in 5% decrements conservative - as “ondemand”, but switches to higher frequencies in 5% steps rather than going immediately to the maximum userspace - frequency is set by a userspace application Chris Simmonds 2net Ltd 5
CPUFreq settings  In /sys/devices/system/cpu/cpu0/cpufreq/  scaling_max_freq and scaling_min_freq and scaling_available_frequencies  scaling_available_governors which lists the names of the built-in governors  scaling_governor which tells you the current governor and allows you to set a new one  scaling_setspeed allows you to set the speed if the governor is set to “userspace” Chris Simmonds 2net Ltd 6
User space governors  The “userspace” governor allows the frequency to be set by writing to scaling_setspeed  Examples  cpuspeed [2], cpudyn [3] and cpufreqd [4] Chris Simmonds 2net Ltd 7
Dynamic tick  Historically Linux has a regular timer tick  HZ from 100 to 1000  Can create unnecessary wakeups  Dynamic tick mode means timer interrupts occur only when needed  CONFIG_NO_HZ in Linux 2.6.21 Chris Simmonds 2net Ltd 8
分享到:
收藏