This article as an introductory document of sketchy, will be expanded later, gradually enriched.
About Linux Power saving:
When the CPU is in the working state:
1. The device enables RPM and the unused device is turned off dynamically.
2. Cpufreq dynamically adjusts the frequency voltage of the CPU/GPU to reduce power consumption.
3. Cpuidle allow the CPU to enter the idle state, or to sleep deep.
4. CPU HotPlug Dynamic hot-swapping of unused CPUs.
CPU goes to sleep state:
1. Suspend, if the entire system has nothing to dry into the suspend, including two kinds of suspend idle and suspend to RAM.
2. Resume, interrupt to wake.
Development process
Designing a model is the first step in developing a PM feature. After the model is well designed, the parameter interfaces are retained and can be optimized for specific individuals based on these parameters.
It is particularly important to establish a fast iterative, accurate, reliable, and quantifiable verification environment. On the one hand, you can verify that the design model is valid and correct, on the other hand, you can adjust to find the most suitable parameters.
For embedded devices, the most important is to achieve the balance of performance and power: to meet the performance requirements of the premise, to minimize power consumption.
This involves how to quantify performance (performance) and power consumption (power).
The quantization power consumption is simple and can be obtained by Power Monitor at the point of measurement (it is important to determine the measurement point!) );
Quantization performance is more complex, and for different functional modules, different performance analysis tools are required.
In addition, specific workload may need to be generated for different modules.
Finally, the readability of statistical information or visualization chart is more conducive to the analysis results.
In Lisa, for example, you can use workload Rt-app to generate specific scheduling side rates, run time, threads running on a specific CPU, and ensure a consistent running environment.
The Power monitor data in the test process can be obtained through devlib.
Visual charts and statistics are then generated in the browser through the Ipython script.
Development process
1. Design the Model: Design a new model (IPA in thermal), as required, in an existing framework, or design a new power model such as EAS. The current phase is mainly to follow the existing power model.
2. Kernel implementation: Based on the previous power model, the code is implemented in the kernel.
3. Verify the Environment: Establish an environment for validating the model, with tools for quantifying performance on the one hand, and tools to quantify power on the other.
4. Is the model correct or not?: Verify the environment to see if the model meets expectations and redesign it if it does not conform.
5. Adjust the model: Re-adjust the model defect according to the 4th step verification result.
6. Optimization algorithm: To verify whether the algorithm is efficient, to improve the efficiency of performance, lower power.
Android/linux Core Power Management Introduction to the thermal Framework
Analysis of Android/linux Thermal framework and its governor contrast
The analysis and use of IPA in Android/linux Thermal governor
Cpufreq Framework
"Linux dynamic Frequency regulation system Cpufreq: an overview"
"Linux dynamic Frequency regulation system Cpufreq: Core architecture and API"
Analysis and optimization of Cpuidle frameworksuspend
"Suspend to RAM and Suspend to idle analysis, and performance comparisons on Hikey"
"Cpu_ops, Suspend_ops, Arm_idle_driver and Machine_restart/machine_power_off to the bottom Psci firmware analysis"
Wowotech Organizing Documents
Linux power Management (1) _ Overall architecture
Http://www.wowotech.net/pm_subsystem/pm_architecture.html
Linux power Management (2) Basic concepts and software architecture of _generic pm
Http://www.wowotech.net/pm_subsystem/generic_pm_architecture.html
Linux power Management (3) _generic pm reboot process
Http://www.wowotech.net/pm_subsystem/reboot.html
Linux power Management (4) _power Management Interface
Http://www.wowotech.net/pm_subsystem/pm_interface.html
Linux Power Management (5) _hibernate and sleep feature introduction
Http://www.wowotech.net/pm_subsystem/std_str_func.html
Linux Power Management (6) _generic pm Suspend function
Http://www.wowotech.net/pm_subsystem/suspend_and_resume.html
Linux Power Management (7) _wakeup Events Framework
Http://www.wowotech.net/pm_subsystem/wakeup_events_framework.html
Linux power Management (8) _wakeup count feature
Http://www.wowotech.net/pm_subsystem/wakeup_count.html
Linux Power Management (9) _wakelocks
Http://www.wowotech.net/pm_subsystem/wakelocks.html
Linux power Management (_AUTOSLEEP)
Http://www.wowotech.net/pm_subsystem/autosleep.html
Linux power Management (one) _runtime pm function description
Http://www.wowotech.net/pm_subsystem/rpm_overview.html
Linux power Management (_hibernate) features
Http://www.wowotech.net/pm_subsystem/hibernation.html
Power management for Linux power Management (_driver)
Http://www.wowotech.net/pm_subsystem/driver_pm.html
Linux Power Management (14) _ Power management from a device-driven perspective
Http://www.wowotech.net/pm_subsystem/device_driver_pm.html
Linux power Management (_PM) OPP Interface
Http://www.wowotech.net/pm_subsystem/pm_opp.html
Linux Common Clock Framework (1) _ Overview
Http://www.wowotech.net/pm_subsystem/clk_overview.html
Linux Common Clock Framework (2) _clock provider
Http://www.wowotech.net/pm_subsystem/clock_provider.html
Linux Common Clock Framework (3) _ for logical analysis
Http://www.wowotech.net/pm_subsystem/clock_framework_core.html
Linux PM Domain Framework (1) _ Overview and usage process
Http://www.wowotech.net/pm_subsystem/pm_domain_overview.html
Linux Cpuidle Framework (1) _ Overview and software architecture
Http://www.wowotech.net/pm_subsystem/cpuidle_overview.html
Linux Cpuidle Framework (2) _cpuidle core
Http://www.wowotech.net/pm_subsystem/cpuidle_core.html
Linux Cpuidle Framework (3) _arm64 Generic CPU idle Driver
Http://www.wowotech.net/pm_subsystem/cpuidle_arm64.html
Linux Cpuidle Framework (4) _menu governor
Http://www.wowotech.net/pm_subsystem/cpuidle_menu_governor.html
Linux PM QoS Framework (1) _ Overview and software architecture
Http://www.wowotech.net/pm_subsystem/pm_qos_overview.html
Linux PM QoS Framework (2) _PM QoS class
Http://www.wowotech.net/pm_subsystem/pm_qos_class.html
Linux pm QoS Framework (3) _per-device pm QoS
Http://www.wowotech.net/pm_subsystem/per_device_pm_qos.html
Linux power supply Class (1) _ Software architecture and API integration
Http://www.wowotech.net/pm_subsystem/psy_class_overview.html
Linux Regulator Framework (1) _ Overview
Http://www.wowotech.net/pm_subsystem/regulator_framework_overview.html
Linux Regulator Framework (2) _regulator driver
Http://www.wowotech.net/pm_subsystem/regulator_driver.html
Linux CPU Core Power Management (1) _ Overview
Http://www.wowotech.net/pm_subsystem/cpu_core_pm_overview.html
Linux CPU Core Power Management (2) _CPU topology
Http://www.wowotech.net/pm_subsystem/cpu_topology.html
Linux CPU Core Power Management (3) _cpu Ops
Http://www.wowotech.net/pm_subsystem/cpu_ops.html
Linux CPU Core Power Management (5) _CPU control and CPU HotPlug
Http://www.wowotech.net/pm_subsystem/cpu_hotplug.html
Linux Cpufreq Framework (1) _ Overview
Http://www.wowotech.net/pm_subsystem/cpufreq_overview.html
Linux Cpufreq Framework (2) _cpufreq driver
Http://www.wowotech.net/pm_subsystem/cpufreq_driver.html
Linux Cpufreq Framework (3) _cpufreq core
Http://www.wowotech.net/pm_subsystem/cpufreq_core.html
Linux Cpufreq Framework (4) _cpufreq governor
Http://www.wowotech.net/pm_subsystem/cpufreq_governor.html
Linux Cpufreq Framework (5) _arm Big Little Driver
Http://www.wowotech.net/pm_subsystem/arm_big_little_driver.html
Linux process Freeze Technology
Http://www.wowotech.net/pm_subsystem/237.html
Common Clock Framework System architecture
Http://www.wowotech.net/pm_subsystem/ccf-arch.html
Android Power HAL
Introduction to Development tools
"Workload Automation analysis and its use"
"Lisa Introduction and how to use it"
"Pyvisa Introduction"
"Python Library for Scientific Computing"
"Linux Power Management Debug"
...
Development summary of power management under Linux