Re: [PATCH] thermal: core: warn on non-critical trips at or above critical temp
"Rafael J. Wysocki (Intel)" <[email protected]>
| Newsgroups | org.kernel.vger.linux-pm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAJZ5v0i_=cZH3tB6W51wkh7Xq4XxbtKuMdUxnnKcdwokec4YsA@mail.gmail.com> |
On Tue, Jul 28, 2026 at 12:12 AM Daniel Lezcano <[email protected]> wrote: > > On 7/22/26 21:43, Rafael J. Wysocki (Intel) wrote: > > On Fri, Jul 10, 2026 at 11:12 AM Gaurav Kohli > > <[email protected]> wrote: > >> > >> Thermal zones can be registered or updated with non-critical trips at or > >> above the critical trip temperature. Such trips cannot provide useful > >> mitigation before critical trip handling runs, and a HOT trip at that > >> temperature can coincide with shutdown. > >> > >> Warn at registration time and on trip temperature changes to surface > >> misconfigured platform data and incorrect dynamic updates early. When > >> multiple critical trips exist, warn against the lowest one. > >> > >> Signed-off-by: Gaurav Kohli <[email protected]> > > > > There are a couple of reasons why I don't like this, the most > > important one being the overhead: two walks over all trips added to > > every trip temperature update is a bit of a stretch. > > > > Moreover, the messages produced by this code may not even be noticed > > on systems in the field and users may not be able to do anything about > > them, so the benefit is questionable. > > Would it make sense to sort the trip points when they are registered. > Then limit the changes to the interval between trip-1 and trip+1 ? Sorting the trps in the core is problematic because by the time the core sees them, they may have been associated with some internal data structures of the driver ordered in the same way.