SlideShare a Scribd company logo
1 of 19
Power Management
Scott Shu
Power Modes
• DFS
• Halt
• Doze
• Sleep
• Hibernate
Linux PM Framework
• CPUIdle
– Idle threads trigger sleep states (C0, C1, …)
• CPUFreq
– CPU Frequency scaling (CPU DFS)
• CPU DVFS
• CPU Hotplug
• DDR DVFS
• Peripheral DVFS
• Suspend (save to RAM)
• Hibernate (save to Disk)
SW-HW PM Mapping
CPUIdle
• For UP system, support 2 idle stetes
– C0: CPU WFI
– C1: CPU WFI and DDR self-refresh
• For SMP system, only support 1 idle state
– C0: CPU WFI
• CPUIdle governors
– The menu governor can jump into a deeper state immediately.
(C0 -> C2)
– The ladder governor enters the lightest state first, and move on
to the next deeper state if a sleep was long enough. (C0 -> C1 ->
C2)
• Driver
– drivers/cpuidle/cpuidle-xxxxxx.c
CPUIdle Example
# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/desc
Wait for interrupt ; Shows the description of the state
# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/disable
0
# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/latency
1 ; Shows the wakeup latency for this state.
# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/name
WFI ; Shows the name of the state
# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/power
4294967295 ; Shows the typical power consumed when CPU enters this state in mW
# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/time
79420040 ; Shows the amount of time spent in this idle state in usec.
# cat /sys/devices/system/cpu/cpu0/cpuidle/state0/usage
14417 ; Shows the count of number of times this idle state has been entered
CPUFreq
• CPU Frequency Scaling
• CPUFreq governors
– Conservative: Dynamically switch between CPU(s) available if
at 75% load
– Ondemand: Dynamically switch between CPU(s) available if at
95% load
– Performance: Run the CPU at maximum frequency
– Powersave: Run the CPU at the minimum frequency
– Userspace: Run the CPU at user specified frequencies
• Driver
– drivers/cpufreq/xxxxxx-cpufreq.c
CPUFreq Example
# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
800
# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq
100
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Userspace
# echo 700 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
700
# mhz
700 MHz, 1.4286 nanosec clock
CPU DVFS
• CPUFreq + Voltage Layer
• Regulator Framework
– Regulates the output power from input power
• Voltage Control
• Current Limiting
• Switch output power ON/OFF
VDD1 1100 ~ 1200 mV CPU_1V1
VDD2 1350 ~ 1500 mV DRAM_1V5
VIO 3300 mV D.3.3V_G
VDDCTRL 1100 mV SOC_1V1
LDO1 1800 mV Reserved
LDO2 2500 mV Reserved
LDO3 1100 mV SB_1.1V
LDO4 1100 mV Reserved
LDO5 3300 mV SB_3.3V
LDO6 3300 mV Reserved
LDO7 2500 mV CHIP_2.5V
LDO8 1000 ~ 3300 mV SD_IF_VDD
Regulator Framework
• Regulator APIs
struct regulator * regulator_get (struct device *dev,
const char *id);
regulator_put(regulator);
int regulator_set_voltage(struct regulator *regulator,
int min_uV, int max_uV);
int regulator_get_voltage(struct regulator *regulator);
int regulator_enable(regulator);
int regulator_disable(regulator);
int regulator_force_disable(regulator);
int regulator_is_enabled(regulator);
Reference:
https://www.kernel.org/doc/htmldocs/regulator.html
CPU DVFS Example
# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
800
# cat /sys/class/regulator/regulator.3/microvolts
1200000
; Change CPU speed to 700 MHz
# echo 700 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
700
# cat /sys/class/regulator/regulator.3/microvolts
1187500
CPU Hotplug
• CPU hotplug is one approach for bring up /
shutdown the secondary CPU Cores
• The code can be used by kernel “suspend” and
“hibernate”.
• From a power consumption point of view, the
CPU hotplug feature might not be very useful
for a SMP system.
CPU Hotplug Example
# cat /sys/devices/system/cpu/online
0-2
# cat /sys/devices/system/cpu/offline
# echo 0 > /sys/devices/system/cpu/cpu2/online
[ 7732.890000] CPU2: shutdown
# cat /sys/devices/system/cpu/online
0-1
# cat /sys/devices/system/cpu/offline
2
# echo 1 > /sys/devices/system/cpu/cpu2/online
[ 7759.660000] CPU2: Booted secondary processor
# cat /sys/devices/system/cpu/online
0-2
DDR DVFS
DevFreq
• DVFS framework for non-CPU device
• Clock Tree
Clock Tree
• Clock APIs
• Device
• Driver
– arch/arm/mach-xxxxxx/clock.c
Suspend
Hibernate
Example
• Lightweight Suspend (DOZE Mode)
# echo suspend > /sys/power/state
• Suspend (SLEEP Mode)
# echo mem > /sys/power/state
• Hibernate (HIBERNATE Mode)
# echo disk > /sys/power/state

More Related Content

What's hot

HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareLinaro
 
linux device driver
linux device driverlinux device driver
linux device driverRahul Batra
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013Wave Digitech
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Jian-Hong Pan
 
Embedded linux system development (slides)
Embedded linux system development (slides)Embedded linux system development (slides)
Embedded linux system development (slides)Jaime Barragan
 
Zen 2: The AMD 7nm Energy-Efficient High-Performance x86-64 Microprocessor Core
Zen 2: The AMD 7nm Energy-Efficient High-Performance x86-64 Microprocessor CoreZen 2: The AMD 7nm Energy-Efficient High-Performance x86-64 Microprocessor Core
Zen 2: The AMD 7nm Energy-Efficient High-Performance x86-64 Microprocessor CoreAMD
 
Reconnaissance of Virtio: What’s new and how it’s all connected?
Reconnaissance of Virtio: What’s new and how it’s all connected?Reconnaissance of Virtio: What’s new and how it’s all connected?
Reconnaissance of Virtio: What’s new and how it’s all connected?Samsung Open Source Group
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)shimosawa
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernelguest547d74
 
Optimizing Servers for High-Throughput and Low-Latency at Dropbox
Optimizing Servers for High-Throughput and Low-Latency at DropboxOptimizing Servers for High-Throughput and Low-Latency at Dropbox
Optimizing Servers for High-Throughput and Low-Latency at DropboxScyllaDB
 
The Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxThe Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxPicker Weng
 
QEMU - Binary Translation
QEMU - Binary Translation QEMU - Binary Translation
QEMU - Binary Translation Jiann-Fuh Liaw
 

What's hot (20)

HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
 
Linux Usb overview
Linux Usb  overviewLinux Usb  overview
Linux Usb overview
 
Spi drivers
Spi driversSpi drivers
Spi drivers
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
linux device driver
linux device driverlinux device driver
linux device driver
 
Linux Device Tree
Linux Device TreeLinux Device Tree
Linux Device Tree
 
Power Management from Linux Kernel to Android
Power Management from Linux Kernel to AndroidPower Management from Linux Kernel to Android
Power Management from Linux Kernel to Android
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
 
Embedded linux system development (slides)
Embedded linux system development (slides)Embedded linux system development (slides)
Embedded linux system development (slides)
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Zen 2: The AMD 7nm Energy-Efficient High-Performance x86-64 Microprocessor Core
Zen 2: The AMD 7nm Energy-Efficient High-Performance x86-64 Microprocessor CoreZen 2: The AMD 7nm Energy-Efficient High-Performance x86-64 Microprocessor Core
Zen 2: The AMD 7nm Energy-Efficient High-Performance x86-64 Microprocessor Core
 
Reconnaissance of Virtio: What’s new and how it’s all connected?
Reconnaissance of Virtio: What’s new and how it’s all connected?Reconnaissance of Virtio: What’s new and how it’s all connected?
Reconnaissance of Virtio: What’s new and how it’s all connected?
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
Linux Internals - Interview essentials - 1.0
Linux Internals - Interview essentials - 1.0Linux Internals - Interview essentials - 1.0
Linux Internals - Interview essentials - 1.0
 
Optimizing Servers for High-Throughput and Low-Latency at Dropbox
Optimizing Servers for High-Throughput and Low-Latency at DropboxOptimizing Servers for High-Throughput and Low-Latency at Dropbox
Optimizing Servers for High-Throughput and Low-Latency at Dropbox
 
The Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxThe Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on Linux
 
QEMU - Binary Translation
QEMU - Binary Translation QEMU - Binary Translation
QEMU - Binary Translation
 
Embedded Linux on ARM
Embedded Linux on ARMEmbedded Linux on ARM
Embedded Linux on ARM
 

Viewers also liked

SFO15-302: Energy Aware Scheduling: Progress Update
SFO15-302: Energy Aware Scheduling: Progress UpdateSFO15-302: Energy Aware Scheduling: Progress Update
SFO15-302: Energy Aware Scheduling: Progress UpdateLinaro
 
Android power management
Android power managementAndroid power management
Android power managementJerrin George
 
LCA13: Power State Coordination Interface
LCA13: Power State Coordination InterfaceLCA13: Power State Coordination Interface
LCA13: Power State Coordination InterfaceLinaro
 
ParrobaArTeCsecs_11-03-13
ParrobaArTeCsecs_11-03-13ParrobaArTeCsecs_11-03-13
ParrobaArTeCsecs_11-03-13greendisc
 
Dvfs nima-afraz
Dvfs nima-afrazDvfs nima-afraz
Dvfs nima-afrazNima Afraz
 
Energy efficient computing & computational services
Energy efficient computing & computational services Energy efficient computing & computational services
Energy efficient computing & computational services David Wallom
 
Green cloud computing using heuristic algorithms
Green cloud computing using heuristic algorithmsGreen cloud computing using heuristic algorithms
Green cloud computing using heuristic algorithmsIliad Mnd
 
LCA13: Who Disturbs My Slumber
LCA13: Who Disturbs My SlumberLCA13: Who Disturbs My Slumber
LCA13: Who Disturbs My SlumberLinaro
 
BKK16-311 EAS Upstream Stategy
BKK16-311 EAS Upstream StategyBKK16-311 EAS Upstream Stategy
BKK16-311 EAS Upstream StategyLinaro
 
Linaro Connect 2016 (BKK16) - Introduction to LISA
Linaro Connect 2016 (BKK16) - Introduction to LISALinaro Connect 2016 (BKK16) - Introduction to LISA
Linaro Connect 2016 (BKK16) - Introduction to LISAPatrick Bellasi
 
Electrical power system management
Electrical power system managementElectrical power system management
Electrical power system managementAkshay Awadhani
 
Linux Power Management Slideshare
Linux Power Management SlideshareLinux Power Management Slideshare
Linux Power Management SlidesharePatrick Bellasi
 
Summit 16: ARM Mini-Summit - Efficient NFV solutions for Cloud and Edge - Cavium
Summit 16: ARM Mini-Summit - Efficient NFV solutions for Cloud and Edge - CaviumSummit 16: ARM Mini-Summit - Efficient NFV solutions for Cloud and Edge - Cavium
Summit 16: ARM Mini-Summit - Efficient NFV solutions for Cloud and Edge - CaviumOPNFV
 
Embedded Systems Power Management
Embedded Systems Power ManagementEmbedded Systems Power Management
Embedded Systems Power ManagementPatrick Bellasi
 
Intelligent electrical system
Intelligent electrical systemIntelligent electrical system
Intelligent electrical systemmuddulakshmi
 
Cells and batteries
Cells and batteriesCells and batteries
Cells and batteriesAmy Gilewska
 
Presentation on battery
Presentation on batteryPresentation on battery
Presentation on batterySheikh Aves
 

Viewers also liked (19)

SFO15-302: Energy Aware Scheduling: Progress Update
SFO15-302: Energy Aware Scheduling: Progress UpdateSFO15-302: Energy Aware Scheduling: Progress Update
SFO15-302: Energy Aware Scheduling: Progress Update
 
Android power management
Android power managementAndroid power management
Android power management
 
LCA13: Power State Coordination Interface
LCA13: Power State Coordination InterfaceLCA13: Power State Coordination Interface
LCA13: Power State Coordination Interface
 
ParrobaArTeCsecs_11-03-13
ParrobaArTeCsecs_11-03-13ParrobaArTeCsecs_11-03-13
ParrobaArTeCsecs_11-03-13
 
Dvfs nima-afraz
Dvfs nima-afrazDvfs nima-afraz
Dvfs nima-afraz
 
Energy efficient computing & computational services
Energy efficient computing & computational services Energy efficient computing & computational services
Energy efficient computing & computational services
 
Green cloud computing using heuristic algorithms
Green cloud computing using heuristic algorithmsGreen cloud computing using heuristic algorithms
Green cloud computing using heuristic algorithms
 
LCA13: Who Disturbs My Slumber
LCA13: Who Disturbs My SlumberLCA13: Who Disturbs My Slumber
LCA13: Who Disturbs My Slumber
 
BKK16-311 EAS Upstream Stategy
BKK16-311 EAS Upstream StategyBKK16-311 EAS Upstream Stategy
BKK16-311 EAS Upstream Stategy
 
Linaro Connect 2016 (BKK16) - Introduction to LISA
Linaro Connect 2016 (BKK16) - Introduction to LISALinaro Connect 2016 (BKK16) - Introduction to LISA
Linaro Connect 2016 (BKK16) - Introduction to LISA
 
Electrical power system management
Electrical power system managementElectrical power system management
Electrical power system management
 
Linux Power Management Slideshare
Linux Power Management SlideshareLinux Power Management Slideshare
Linux Power Management Slideshare
 
Power Management in BMS
Power Management in BMSPower Management in BMS
Power Management in BMS
 
Summit 16: ARM Mini-Summit - Efficient NFV solutions for Cloud and Edge - Cavium
Summit 16: ARM Mini-Summit - Efficient NFV solutions for Cloud and Edge - CaviumSummit 16: ARM Mini-Summit - Efficient NFV solutions for Cloud and Edge - Cavium
Summit 16: ARM Mini-Summit - Efficient NFV solutions for Cloud and Edge - Cavium
 
Embedded Systems Power Management
Embedded Systems Power ManagementEmbedded Systems Power Management
Embedded Systems Power Management
 
Intelligent electrical system
Intelligent electrical systemIntelligent electrical system
Intelligent electrical system
 
Cells and batteries
Cells and batteriesCells and batteries
Cells and batteries
 
Presentation on battery
Presentation on batteryPresentation on battery
Presentation on battery
 
Battery
Battery Battery
Battery
 

Similar to Power management

Kernel Features for Reducing Power Consumption on Embedded Devices
Kernel Features for Reducing Power Consumption on Embedded DevicesKernel Features for Reducing Power Consumption on Embedded Devices
Kernel Features for Reducing Power Consumption on Embedded DevicesRyo Jin
 
Tizen Developer Conference 2017 San Francisco - Tizen Power Management Servic...
Tizen Developer Conference 2017 San Francisco - Tizen Power Management Servic...Tizen Developer Conference 2017 San Francisco - Tizen Power Management Servic...
Tizen Developer Conference 2017 San Francisco - Tizen Power Management Servic...Chanwoo Choi
 
Summit demystifying systemd1
Summit demystifying systemd1Summit demystifying systemd1
Summit demystifying systemd1Susant Sahani
 
VMworld 2016: vSphere 6.x Host Resource Deep Dive
VMworld 2016: vSphere 6.x Host Resource Deep DiveVMworld 2016: vSphere 6.x Host Resource Deep Dive
VMworld 2016: vSphere 6.x Host Resource Deep DiveVMworld
 
Advanced Diagnostics 2
Advanced Diagnostics 2Advanced Diagnostics 2
Advanced Diagnostics 2Aero Plane
 
[IDF'15 SF] RPCS001 — Overclocking 6th Generation Intel® Core™ Processors!
[IDF'15 SF] RPCS001 — Overclocking 6th Generation Intel® Core™ Processors![IDF'15 SF] RPCS001 — Overclocking 6th Generation Intel® Core™ Processors!
[IDF'15 SF] RPCS001 — Overclocking 6th Generation Intel® Core™ Processors!HWBOT
 
Nvidia tegra K1 Presentation
Nvidia tegra K1 PresentationNvidia tegra K1 Presentation
Nvidia tegra K1 PresentationANURAG SEKHSARIA
 
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on CephBuild an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on CephRongze Zhu
 
Deep Dive on Amazon EC2 Instances (March 2017)
Deep Dive on Amazon EC2 Instances (March 2017)Deep Dive on Amazon EC2 Instances (March 2017)
Deep Dive on Amazon EC2 Instances (March 2017)Julien SIMON
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stablejuet-y
 
Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Cheng-Chun William Tu
 

Similar to Power management (20)

Kernel Features for Reducing Power Consumption on Embedded Devices
Kernel Features for Reducing Power Consumption on Embedded DevicesKernel Features for Reducing Power Consumption on Embedded Devices
Kernel Features for Reducing Power Consumption on Embedded Devices
 
Tizen Developer Conference 2017 San Francisco - Tizen Power Management Servic...
Tizen Developer Conference 2017 San Francisco - Tizen Power Management Servic...Tizen Developer Conference 2017 San Francisco - Tizen Power Management Servic...
Tizen Developer Conference 2017 San Francisco - Tizen Power Management Servic...
 
Summit demystifying systemd1
Summit demystifying systemd1Summit demystifying systemd1
Summit demystifying systemd1
 
VMworld 2016: vSphere 6.x Host Resource Deep Dive
VMworld 2016: vSphere 6.x Host Resource Deep DiveVMworld 2016: vSphere 6.x Host Resource Deep Dive
VMworld 2016: vSphere 6.x Host Resource Deep Dive
 
Advanced Diagnostics 2
Advanced Diagnostics 2Advanced Diagnostics 2
Advanced Diagnostics 2
 
Docker, JVM and CPU
Docker, JVM and CPUDocker, JVM and CPU
Docker, JVM and CPU
 
[IDF'15 SF] RPCS001 — Overclocking 6th Generation Intel® Core™ Processors!
[IDF'15 SF] RPCS001 — Overclocking 6th Generation Intel® Core™ Processors![IDF'15 SF] RPCS001 — Overclocking 6th Generation Intel® Core™ Processors!
[IDF'15 SF] RPCS001 — Overclocking 6th Generation Intel® Core™ Processors!
 
Nvidia tegra K1 Presentation
Nvidia tegra K1 PresentationNvidia tegra K1 Presentation
Nvidia tegra K1 Presentation
 
WAN - trends and use cases
WAN - trends and use casesWAN - trends and use cases
WAN - trends and use cases
 
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on CephBuild an High-Performance and High-Durable Block Storage Service Based on Ceph
Build an High-Performance and High-Durable Block Storage Service Based on Ceph
 
Arm7 architecture
Arm7 architectureArm7 architecture
Arm7 architecture
 
The Spectre of Meltdowns
The Spectre of MeltdownsThe Spectre of Meltdowns
The Spectre of Meltdowns
 
Deep Dive on Amazon EC2 Instances (March 2017)
Deep Dive on Amazon EC2 Instances (March 2017)Deep Dive on Amazon EC2 Instances (March 2017)
Deep Dive on Amazon EC2 Instances (March 2017)
 
ceph-barcelona-v-1.2
ceph-barcelona-v-1.2ceph-barcelona-v-1.2
ceph-barcelona-v-1.2
 
Ceph barcelona-v-1.2
Ceph barcelona-v-1.2Ceph barcelona-v-1.2
Ceph barcelona-v-1.2
 
Cisco-6500-v1.0-R
Cisco-6500-v1.0-RCisco-6500-v1.0-R
Cisco-6500-v1.0-R
 
ARM AAE - System Issues
ARM AAE - System IssuesARM AAE - System Issues
ARM AAE - System Issues
 
SR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/StableSR-IOV+KVM on Debian/Stable
SR-IOV+KVM on Debian/Stable
 
Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018Fast Userspace OVS with AF_XDP, OVS CONF 2018
Fast Userspace OVS with AF_XDP, OVS CONF 2018
 
Arm architecture overview
Arm architecture overviewArm architecture overview
Arm architecture overview
 

Recently uploaded

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfOverkill Security
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 

Recently uploaded (20)

Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 

Power management

  • 2. Power Modes • DFS • Halt • Doze • Sleep • Hibernate
  • 3. Linux PM Framework • CPUIdle – Idle threads trigger sleep states (C0, C1, …) • CPUFreq – CPU Frequency scaling (CPU DFS) • CPU DVFS • CPU Hotplug • DDR DVFS • Peripheral DVFS • Suspend (save to RAM) • Hibernate (save to Disk)
  • 5. CPUIdle • For UP system, support 2 idle stetes – C0: CPU WFI – C1: CPU WFI and DDR self-refresh • For SMP system, only support 1 idle state – C0: CPU WFI • CPUIdle governors – The menu governor can jump into a deeper state immediately. (C0 -> C2) – The ladder governor enters the lightest state first, and move on to the next deeper state if a sleep was long enough. (C0 -> C1 -> C2) • Driver – drivers/cpuidle/cpuidle-xxxxxx.c
  • 6. CPUIdle Example # cat /sys/devices/system/cpu/cpu0/cpuidle/state0/desc Wait for interrupt ; Shows the description of the state # cat /sys/devices/system/cpu/cpu0/cpuidle/state0/disable 0 # cat /sys/devices/system/cpu/cpu0/cpuidle/state0/latency 1 ; Shows the wakeup latency for this state. # cat /sys/devices/system/cpu/cpu0/cpuidle/state0/name WFI ; Shows the name of the state # cat /sys/devices/system/cpu/cpu0/cpuidle/state0/power 4294967295 ; Shows the typical power consumed when CPU enters this state in mW # cat /sys/devices/system/cpu/cpu0/cpuidle/state0/time 79420040 ; Shows the amount of time spent in this idle state in usec. # cat /sys/devices/system/cpu/cpu0/cpuidle/state0/usage 14417 ; Shows the count of number of times this idle state has been entered
  • 7. CPUFreq • CPU Frequency Scaling • CPUFreq governors – Conservative: Dynamically switch between CPU(s) available if at 75% load – Ondemand: Dynamically switch between CPU(s) available if at 95% load – Performance: Run the CPU at maximum frequency – Powersave: Run the CPU at the minimum frequency – Userspace: Run the CPU at user specified frequencies • Driver – drivers/cpufreq/xxxxxx-cpufreq.c
  • 8. CPUFreq Example # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq 800 # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq 100 # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor Userspace # echo 700 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 700 # mhz 700 MHz, 1.4286 nanosec clock
  • 9. CPU DVFS • CPUFreq + Voltage Layer • Regulator Framework – Regulates the output power from input power • Voltage Control • Current Limiting • Switch output power ON/OFF VDD1 1100 ~ 1200 mV CPU_1V1 VDD2 1350 ~ 1500 mV DRAM_1V5 VIO 3300 mV D.3.3V_G VDDCTRL 1100 mV SOC_1V1 LDO1 1800 mV Reserved LDO2 2500 mV Reserved LDO3 1100 mV SB_1.1V LDO4 1100 mV Reserved LDO5 3300 mV SB_3.3V LDO6 3300 mV Reserved LDO7 2500 mV CHIP_2.5V LDO8 1000 ~ 3300 mV SD_IF_VDD
  • 10. Regulator Framework • Regulator APIs struct regulator * regulator_get (struct device *dev, const char *id); regulator_put(regulator); int regulator_set_voltage(struct regulator *regulator, int min_uV, int max_uV); int regulator_get_voltage(struct regulator *regulator); int regulator_enable(regulator); int regulator_disable(regulator); int regulator_force_disable(regulator); int regulator_is_enabled(regulator); Reference: https://www.kernel.org/doc/htmldocs/regulator.html
  • 11. CPU DVFS Example # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 800 # cat /sys/class/regulator/regulator.3/microvolts 1200000 ; Change CPU speed to 700 MHz # echo 700 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq 700 # cat /sys/class/regulator/regulator.3/microvolts 1187500
  • 12. CPU Hotplug • CPU hotplug is one approach for bring up / shutdown the secondary CPU Cores • The code can be used by kernel “suspend” and “hibernate”. • From a power consumption point of view, the CPU hotplug feature might not be very useful for a SMP system.
  • 13. CPU Hotplug Example # cat /sys/devices/system/cpu/online 0-2 # cat /sys/devices/system/cpu/offline # echo 0 > /sys/devices/system/cpu/cpu2/online [ 7732.890000] CPU2: shutdown # cat /sys/devices/system/cpu/online 0-1 # cat /sys/devices/system/cpu/offline 2 # echo 1 > /sys/devices/system/cpu/cpu2/online [ 7759.660000] CPU2: Booted secondary processor # cat /sys/devices/system/cpu/online 0-2
  • 15. DevFreq • DVFS framework for non-CPU device • Clock Tree
  • 16. Clock Tree • Clock APIs • Device • Driver – arch/arm/mach-xxxxxx/clock.c
  • 19. Example • Lightweight Suspend (DOZE Mode) # echo suspend > /sys/power/state • Suspend (SLEEP Mode) # echo mem > /sys/power/state • Hibernate (HIBERNATE Mode) # echo disk > /sys/power/state