cpufreq: schedutil: Use the frequency below the target if they're close
Schedutil targets a frequency tipping point of 80% to vote for a higher frequency when utilization crosses that threshold. Since the tipping point calculation is done without regard to the size of the gap between each frequency step, this often results in a large frequency jump when it isn't strictly necessary, which hurts energy efficiency. For example, if a CPU has 2000 MHz and 3000 MHz frequency steps, and schedutil targets a frequency of 2005 MHz, then the 3000 MHz frequency step will be used even though the target frequency of 2005 MHz is very close to 2000 MHz. In this hypothetical scenario, using 2000 MHz would clearly satisfy the system's performance needs while consuming less energy than the 3000 MHz step. To counter-balance the frequency tipping point, add a frequency tipping point in the opposite direction to prefer the frequency step below the calculated target frequency when the target frequency is less than 20% higher than that lower step. A threshold of 20% was empirically determined to provide significant energy savings without really impacting performance. This improves schedutil's energy efficiency on CPUs which have large gaps between their frequency steps, as is often the case on ARM. Change-Id: Ie75b79e5eb9f52c966848a9fb1c8016d7ae22098 Signed-off-by:Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by:
Pranav Vashi <neobuddy89@gmail.com>
Loading
Please register or sign in to comment