RFC generic thermal layer enhancement
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest11 of 12 patches 19 repliesIn review
11 of 12 patches are in this archive. The cover letter announces 12.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/12 | thermal: introduce multiple cooling states support for Active cooling devicesdrivers/ | +10 | 0 replies | |
| 2/12 | thermal: Introduce cooling states range support for a certain trip pointdrivers/ | +21 | 0 replies | |
| 3/12 | thermal: set upper and lower limits when bindingdrivers/ drivers/ drivers/ +1 more | +41 | 5 replies | |
| 4/12 | thermal: introduce .get_trend() callbackdrivers/ drivers/ include/ | +58 | 2 replies | |
| 5/12 | thermal: remove tc1/tc2 in generic thermal layerdrivers/ drivers/ drivers/ +3 more | +7 | 0 replies | |
| 6/12 | thermal: introduce active cooling algorithmdrivers/ drivers/ | +71 | 4 replies | |
| 8/12 | thermal: rename thermal_zone_device.cooling_devices to thermal_zone_device.instancesdrivers/ include/ | +11 | 0 replies | |
| 9/12 | thermal: rename thermal_instance.node to thermal_instance.tz_nodedrivers/ | +10 | 0 replies | |
| 10/12 | thermal: reference thermal instances in thermal_cooling_devicedrivers/ include/ | +7 | 0 replies | |
| 11/12 | thermal: introduce cooling state arbitratordrivers/ include/ | +39 | 5 replies | |
| 12/12 | thermal: Unify the code for both active and passive coolingdrivers/ | +23 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/12] generic thermal layer enhancement
Hi, all,
this patch set is made to enhance the current generic thermal layer. It fixes several gaps discussed in
http://marc.info/?l=linux-acpi&m=133836783425764&w=2
and introduces a simple arbitrator to fix the "one cooling devices referenced by multiple trip points in multiple thermal zones" problem.
The whole idea is
1) make sure we have multiple cooling states for both active cooling and passive cooling devices. (patch 1,2,3)
2) remove passive specific requirement, aka, tc1/tc2, and introduce .get_trend() instead, for both active and passive cooling algorithm. (patch 4,5)
3) introduce new function thermal_zone_trip_update(), this contains the code for the general cooling algorithm. (patch 6)
4) rename some thermal structures. Use thermal_instance instead of thermal_cooling_device_instance, as this structure is used to describe the behavior of a certain cooling device for a certain trip point in a certain thermal zone.
thermal_zone_device has a list of all the thermal instances in this thermal zone so that it can update them when the temperature changes. thermal_cooling_device has a list of all the thermal instances for this cooling device so that it can make decision which cooling state should be in when the temperature changes. (patch 7,8,9,10)
5) introduce a simple arbitrator. (patch 11)
When temperature changes, we update a thermal zone in two stages,
a) thermal_zone_trip_point() is the general cooling algorithm to update the thermal instances in the thermal zone device
b) thermal_zone_do_update() is the arbitrator for the cooling device to choose the deepest cooling state required to enter.
6) unify the code for both passive and active cooling.
TODO, add locking mechanism. I know this is important but as this patch set changes the thermal layer a lot, I just want to make sure I'm in the right direction before going on.
BTW, in theory, they should make no change to the behavior of the current generic thermal layer users. But I have just done the build test.
Any comments are welcome.
thanks,
rui
--------------------------------------------------------------------
drivers/acpi/thermal.c | 76 +++++++-- drivers/platform/x86/acerhdf.c | 4 +- drivers/platform/x86/intel_mid_thermal.c | 2 +- drivers/thermal/spear_thermal.c | 2 +- drivers/thermal/thermal_sys.c | 293 ++++++++++++++++++------------ include/linux/thermal.h | 22 ++- 7 files changed, 271 insertions(+), 148 deletions(-)