thermal: core: Redesign the governor interface
Get series with b4
b4 am 13515747.uLZWGnKmhe@kreacherVersions newest first
- v1 Latest16 patches 36 repliesIn review
Patches in v1 No applies recorded yet
Reviews trailers per patch
All 16 patches have a Reviewed-by or Acked-by.
| Patch | Lukasz Luba | Daniel Lezcano |
|---|---|---|
| 1/16 | R-b | |
| 2/16 | R-b | A-b |
| 3/16 | R-b | A-b |
| 4/16 | R-b | A-b |
| 5/16 | R-b | A-b |
| 6/16 | R-b | |
| 7/16 | R-b | |
| 8/16 | R-b | A-b |
| 9/16 | R-b | A-b |
| 10/16 | R-b | |
| 11/16 | R-b | |
| 12/16 | R-b | |
| 13/16 | R-b | |
| 14/16 | R-b | A-b |
| 15/16 | R-b | A-b |
| 16/16 | R-b | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v1 00/16] thermal: core: Redesign the governor interface
Hi Everyone,
First off, apologies for the size of the series, but I couldn't resist throwing a few cleanups in for a good measure.
To the point, this is based on two observations: (1) that the existing .throttle() governor callback is not really suitable or convenient for any governors in the tree and (2) that the majority of governors in the tree do not take trip hysteresis into account, although arguably they should do that.
Point (1) is addressed by replacing the .throttle() callbacks with two new governor callbacks, .trip_crossed() and .manage().
The first one will be invoked whenever a trip is crossed at the time when the netlink messages are sent (so the ordering of these calls will be the same as for the netlink messages). This is suitable for governors that only care about trip crossing events, like Bang-Bang.
The other one will be invoked once per thermal zone update, after all of the trips have been processed by the core, so the governors using it will have to walk the trips by themselves, but they may also skip the trip walk entirely if they don't need it, like the Power Allocator.
The .trip_crossed() callback is introduced in the first patch. Next, the Banb-Bang governor is switched over to using it (instead of .throttle()) and cleaned up.
The .manage() callback is introduced subsequently (in patch [05/16]) and the Power Allocator, Step-Wise and Fair-Share governors are made use it instead of .throttle(), in this order. The latter two are then modified to use trip point thresholds instead of trip temperatures, which they should be doing. Still, all of the patches changing one governor are grouped together.
Finally, the User Space governor is modified to use the .trip_crossed() callback instead of .throttle() and the latter is dropped from the code because it has no more users.
In addition, the handling of critical and hot trip points is relocated to eliminate a redundant check.
Please refer to the individual patch changelogs for details.
The series is on top of the linux-next branch in linux-pm.git, which by now should have been included into linux-next.
There is also a git branch where it can be found:
https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/log/?h=thermal-core-testing
Thanks!