Idle Injection

As we all know, cpufreq is used to control CPU power consumption, the OPP density has great influence on the control precision of cpufreq, however different vendor has different OPP density, and some have large power gap between OPPs, that will result in loss of performance during thermal control and loss of power in other scenes. The base concept of idle injection is to force CPU get into idle state for a specified time each control cycle, it provides another way to control CPU power and heat in addition to cpufreq. Ideally, if all CPUs of a cluster inject idle synchronously, this cluster can get into the deepest idle state and achieve minimum power consumption, but that will also increase system response latency if we inject less than cpuidle latency.

Virtual OPP

With the help of idle injection, we can achieve virtual OPP of any frequency, that makes the precise power control possible even if OPP density is very low. The virtual OPP frequency can be calculated by the following formula: virtual OPP frequency = (100 - injected idle ratio) / 100 * real OPP frequency How to count the injected idle is still a question here, if counted as idle, when CPU is running full load, too much idle injection will make the load looks very low, cpufreq governor can not raise or may even reduce the frequency, if counted as busy, too much idle injection will also make the load higher than we expected, and lead to useless frequency increase. In order to reduce injected idle, the real OPP we used to create virtual OPP must be the closest one that greater than virtual OPP.

WorkingGroups/PowerManagement/Doc/IdleInjection (last modified 2017-11-04 10:03:29)