public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 00/16] thermal: core: Redesign the governor interface
@ 2024-04-10 15:41 Rafael J. Wysocki
  2024-04-10 16:04 ` [PATCH v1 02/16] thermal: gov_bang_bang: Use .trip_crossed() instead of .throttle() Rafael J. Wysocki
                   ` (15 more replies)
  0 siblings, 16 replies; 53+ messages in thread
From: Rafael J. Wysocki @ 2024-04-10 15:41 UTC (permalink / raw)
  To: Linux PM; +Cc: LKML, Daniel Lezcano, Lukasz Luba, Srinivas Pandruvada

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!




^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2024-04-24 11:44 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-10 15:41 [PATCH v1 00/16] thermal: core: Redesign the governor interface Rafael J. Wysocki
2024-04-10 16:04 ` [PATCH v1 02/16] thermal: gov_bang_bang: Use .trip_crossed() instead of .throttle() Rafael J. Wysocki
2024-04-19  9:34   ` Lukasz Luba
2024-04-23 17:04   ` Daniel Lezcano
2024-04-10 16:05 ` [PATCH v1 03/16] thermal: gov_bang_bang: Clean up thermal_zone_trip_update() Rafael J. Wysocki
2024-04-19  9:41   ` Lukasz Luba
2024-04-23 17:05   ` Daniel Lezcano
2024-04-10 16:06 ` [PATCH v1 04/16] thermal: gov_bang_bang: Fold thermal_zone_trip_update() into its caller Rafael J. Wysocki
2024-04-19  9:42   ` Lukasz Luba
2024-04-23 17:06   ` Daniel Lezcano
2024-04-10 16:08 ` [PATCH v1 05/16] thermal: core: Introduce .manage() callback for thermal governors Rafael J. Wysocki
2024-04-19  9:44   ` Lukasz Luba
2024-04-23 17:07   ` Daniel Lezcano
2024-04-10 16:10 ` [PATCH v1 06/16] thermal: gov_power_allocator: Use .manage() callback instead of .throttle() Rafael J. Wysocki
2024-04-19  9:50   ` Lukasz Luba
2024-04-10 16:10 ` [PATCH v1 01/16] thermal: core: Introduce .trip_crossed() callback for thermal governors Rafael J. Wysocki
2024-04-19  8:47   ` Lukasz Luba
2024-04-23 17:14   ` Daniel Lezcano
2024-04-23 17:25     ` Rafael J. Wysocki
2024-04-23 17:58       ` Daniel Lezcano
2024-04-10 16:12 ` [PATCH v1 07/16] thermal: gov_power_allocator: Eliminate a redundant variable Rafael J. Wysocki
2024-04-19  9:56   ` Lukasz Luba
2024-04-23 17:35   ` Daniel Lezcano
2024-04-23 17:54     ` Rafael J. Wysocki
2024-04-23 18:00       ` Daniel Lezcano
2024-04-23 18:05         ` Rafael J. Wysocki
2024-04-23 18:09           ` Daniel Lezcano
2024-04-10 16:13 ` [PATCH v1 08/16] thermal: gov_step_wise: Use .manage() callback instead of .throttle() Rafael J. Wysocki
2024-04-19 17:20   ` Lukasz Luba
2024-04-24  7:54   ` Daniel Lezcano
2024-04-10 16:43 ` [PATCH v1 09/16] thermal: gov_step_wise: Use trip thresholds instead of trip temperatures Rafael J. Wysocki
2024-04-19 19:11   ` Lukasz Luba
2024-04-24  7:03   ` Daniel Lezcano
2024-04-10 16:44 ` [PATCH v1 10/16] thermal: gov_step_wise: Clean up thermal_zone_trip_update() Rafael J. Wysocki
2024-04-19 18:21   ` Lukasz Luba
2024-04-10 16:57 ` [PATCH v1 11/16] thermal: gov_fair_share: Use .manage() callback instead of .throttle() Rafael J. Wysocki
2024-04-19 18:28   ` Lukasz Luba
2024-04-10 16:58 ` [PATCH v1 12/16] thermal: gov_fair_share: Use trip thresholds instead of trip temperatures Rafael J. Wysocki
2024-04-19 19:18   ` Lukasz Luba
2024-04-10 17:00 ` [PATCH v1 13/16] thermal: gov_fair_share: Eliminate unnecessary integer divisions Rafael J. Wysocki
2024-04-19 18:46   ` Lukasz Luba
2024-04-10 17:03 ` [PATCH v1 14/16] thermal: gov_user_space: Use .trip_crossed() instead of .throttle() Rafael J. Wysocki
2024-04-19 18:16   ` Lukasz Luba
2024-04-24  9:14   ` Daniel Lezcano
2024-04-24 11:32     ` Srinivas Pandruvada
2024-04-24 11:34       ` Daniel Lezcano
2024-04-24 11:44         ` Srinivas Pandruvada
2024-04-10 17:42 ` [PATCH v1 15/16] thermal: core: Drop the .throttle() governor callback Rafael J. Wysocki
2024-04-19 18:50   ` Lukasz Luba
2024-04-24  9:11   ` Daniel Lezcano
2024-04-10 17:44 ` [PATCH v1 16/16] thermal: core: Relocate critical and hot trip handling Rafael J. Wysocki
2024-04-19 18:52   ` Lukasz Luba
2024-04-24  9:17   ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox