| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Commit cf736ea6f902 ("thermal: power_allocator: do not use devm*
interfaces") forgot to change a devm_kcalloc() to just kcalloc(), but
it's corresponding devm_kfree() was changed to kfree(). Allocate with
kcalloc() to match the kfree().
Fixes: cf736ea6f902 ("thermal: power_allocator: do not use devm* interfaces")
Cc: Dmitry Torokhov <[email protected]>
Cc: Eduardo Valentin <[email protected]>
Cc: Zhang Rui <[email protected]>
Signed-off-by: Javi Merino <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
|
|
The code in question is called outside of standard driver
probe()/remove() callbacks and thus will not benefit from use of devm*
infrastructure.
Signed-off-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Eduardo Valentin <[email protected]>
|
|
The thermal code uses int, long and unsigned long for temperatures
in different places.
Using an unsigned type limits the thermal framework to positive
temperatures without need. Also several drivers currently will report
temperatures near UINT_MAX for temperatures below 0°C. This will probably
immediately shut the machine down due to overtemperature if started below
0°C.
'long' is 64bit on several architectures. This is not needed since INT_MAX °mC
is above the melting point of all known materials.
Consistently use a plain 'int' for temperatures throughout the thermal code and
the drivers. This only changes the places in the drivers where the temperature
is passed around as pointer, when drivers internally use another type this is
not changed.
Signed-off-by: Sascha Hauer <[email protected]>
Acked-by: Geert Uytterhoeven <[email protected]>
Reviewed-by: Jean Delvare <[email protected]>
Reviewed-by: Lukasz Majewski <[email protected]>
Reviewed-by: Darren Hart <[email protected]>
Reviewed-by: Heiko Stuebner <[email protected]>
Reviewed-by: Peter Feuerer <[email protected]>
Cc: Punit Agrawal <[email protected]>
Cc: Zhang Rui <[email protected]>
Cc: Eduardo Valentin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Jean Delvare <[email protected]>
Cc: Peter Feuerer <[email protected]>
Cc: Heiko Stuebner <[email protected]>
Cc: Lukasz Majewski <[email protected]>
Cc: Stephen Warren <[email protected]>
Cc: Thierry Reding <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Guenter Roeck <[email protected]>
Cc: Rafael J. Wysocki <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Darren Hart <[email protected]>
Cc: [email protected]
Signed-off-by: Zhang Rui <[email protected]>
|
|
The power allocator governor uses ftrace to output a bunch of internal
data for debugging and tuning. Currently, the requested power it
outputs is the "weighted" requested power, that is, what each cooling
device has requested multiplied by the cooling device weight. It is
more useful to trace the real request, without any weight being
applied.
This commit only affects the data traced, there is no functional change.
Cc: Zhang Rui <[email protected]>
Cc: Eduardo Valentin <[email protected]>
Signed-off-by: Javi Merino <[email protected]>
Signed-off-by: Eduardo Valentin <[email protected]>
|
|
In situations where there is an uneven number of cooling devices, the
division of power among them can lead to a milliwatt being dropped on
the floor due to rounding errors. This doesn't sound like a lot, but
some devices only grant the lowest cooling device state for their
maximum power. So for instance, if the granted_power is the maximum
power and all devices are getting their maximum power, one would get
max_power - 1, making it choose cooling device state 1, instead of 0.
Round the division to make the calculation more accurate.
Cc: Zhang Rui <[email protected]>
Cc: Eduardo Valentin <[email protected]>
Signed-off-by: Javi Merino <[email protected]>
Signed-off-by: Eduardo Valentin <[email protected]>
|
|
Add trace events for the power allocator governor and the power actor
interface of the cpu cooling device.
Cc: Zhang Rui <[email protected]>
Cc: Eduardo Valentin <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Acked-by: Steven Rostedt <[email protected]>
Signed-off-by: Javi Merino <[email protected]>
Signed-off-by: Eduardo Valentin <[email protected]>
|
|
The power allocator governor is a thermal governor that controls system
and device power allocation to control temperature. Conceptually, the
implementation divides the sustainable power of a thermal zone among
all the heat sources in that zone.
This governor relies on "power actors", entities that represent heat
sources. They can report current and maximum power consumption and
can set a given maximum power consumption, usually via a cooling
device.
The governor uses a Proportional Integral Derivative (PID) controller
driven by the temperature of the thermal zone. The output of the
controller is a power budget that is then allocated to each power
actor that can have bearing on the temperature we are trying to
control. It decides how much power to give each cooling device based
on the performance they are requesting. The PID controller ensures
that the total power budget does not exceed the control temperature.
Cc: Zhang Rui <[email protected]>
Cc: Eduardo Valentin <[email protected]>
Signed-off-by: Punit Agrawal <[email protected]>
Signed-off-by: Javi Merino <[email protected]>
Signed-off-by: Eduardo Valentin <[email protected]>
|