• Martin Kepplinger's avatar
    thermal/drivers/cpu_cooling: workaround cpuidle time calculation error · 6e8fe3aa
    Martin Kepplinger authored
    For cpuidle_cooling_runtime() returning 0, no idle-injection is
    applied. For an idle injection percentage of 0, this makes sense. But
    this happends for the idle injection percentage of 100 too, which is
    wrong.
    
    The documented calculation: ((idle_cycle * 100) / state) - idle_cycle
    results 0 for state being 100. For "state" from 0 to 99, the thermal
    driver throttles accordingly and keeps the CPUs cool. When switching
    to 100, it stops cooling, we see a jump up in temperature and the CPU
    heats up until it shuts down.
    
    Work around this problem by keeping the "state" at 99 for calculations,
    never reaching 100. The user interface still reaches 100, but there
    is no formal connection to actual data and the UI. It's just a unified
    range that can be implemented in various ways.
    6e8fe3aa
Name
Last commit
Last update
Documentation Loading commit data...
LICENSES Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.clang-format Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.gitlab-ci.yml Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...