summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-04-02 21:03:36 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-04-08 16:01:20 +0200
commit7454f2c42cce10a74312343b66aa2c3dee05d868 (patch)
tree62ec6004a979f1a3487e8f5b1da10547d7b8b558 /include
parent9ad18043fb35feb1d82c1e594575346f16d47dc7 (diff)
downloadlinux-7454f2c42cce10a74312343b66aa2c3dee05d868.tar.gz
linux-7454f2c42cce10a74312343b66aa2c3dee05d868.tar.bz2
linux-7454f2c42cce10a74312343b66aa2c3dee05d868.zip
thermal: core: Sort trip point crossing notifications by temperature
If multiple trip points are crossed in one go and the trips table in the thermal zone device object is not sorted, the corresponding trip point crossing notifications sent to user space will not be ordered either. Moreover, if the trips table is sorted by trip temperature in ascending order, the trip crossing notifications on the way up will be sent in that order too, but the trip crossing notifications on the way down will be sent in the reverse order. This is generally confusing and it is better to make the kernel send the notifications in the order of growing (on the way up) or falling (on the way down) trip temperature. To achieve that, instead of sending a trip crossing notification and recording a trip crossing event in the statistics right away from handle_thermal_trip(), put the trip in question on a list that will be sorted by __thermal_zone_device_update() after processing all of the trips and before sending the notifications and recording trip crossing events. Link: https://lore.kernel.org/linux-pm/20240306085428.88011-1-daniel.lezcano@linaro.org/ Reported-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions