aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-08-19 18:00:19 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-08-22 17:43:14 +0200
commitaa35e56a5217b86f9c05420c36c908baf3b2df5f (patch)
treea86437ff9c5d3aa7a39638b1b6b4a48d3febf1ca /tools/perf/scripts/python
parentthermal: core: Move thermal zone locking out of bind/unbind functions (diff)
downloadlinux-aa35e56a5217b86f9c05420c36c908baf3b2df5f.tar.gz
linux-aa35e56a5217b86f9c05420c36c908baf3b2df5f.zip
thermal: core: Introduce .should_bind() thermal zone callback
The current design of the code binding cooling devices to trip points in thermal zones is convoluted and hard to follow. Namely, a driver that registers a thermal zone can provide .bind() and .unbind() operations for it, which are required to call either thermal_bind_cdev_to_trip() and thermal_unbind_cdev_from_trip(), respectively, or thermal_zone_bind_cooling_device() and thermal_zone_unbind_cooling_device(), respectively, for every relevant trip point and the given cooling device. Moreover, if .bind() is provided and .unbind() is not, the cleanup necessary during the removal of a thermal zone or a cooling device may not be carried out. In other words, the core relies on the thermal zone owners to do the right thing, which is error prone and far from obvious, even though all of that is not really necessary. Specifically, if the core could ask the thermal zone owner, through a special thermal zone callback, whether or not a given cooling device should be bound to a given trip point in the given thermal zone, it might as well carry out all of the binding and unbinding by itself. In particular, the unbinding can be done automatically without involving the thermal zone owner at all because all of the thermal instances associated with a thermal zone or cooling device going away must be deleted regardless. Accordingly, introduce a new thermal zone operation, .should_bind(), that can be invoked by the thermal core for a given thermal zone, trip point and cooling device combination in order to check whether or not the cooling device should be bound to the trip point at hand. It takes an additional cooling_spec argument allowing the thermal zone owner to specify the highest and lowest cooling states of the cooling device and its weight for the given trip point binding. Make the thermal core use this operation, if present, in the absence of .bind() and .unbind(). Note that .should_bind() will be called under the thermal zone lock. No intentional functional impact. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Acked-by: Huisong Li <lihuisong@huawei.com> Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://patch.msgid.link/9334403.CDJkKcVGEf@rjwysocki.net
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
e of self-test config promptsAndrew Donnellan1-3/+3 2015-12-27powerpc/powernv: Only delay opal_rtc_read() retry when necessaryMichael Neuling1-1/+1 2015-12-27powerpc/powernv: Add a kmsg_dumper that flushes console output on panicRussell Currey6-1/+78 2015-12-27powerpc: Copy only required pieces of the mm_context_t to the pacaMichael Neuling3-8/+22 2015-12-19powerpc: Add function to copy mm_context_t to the pacaMichael Neuling5-5/+18 2015-12-17powerpc: Add missing calls to va_end()Daniel Axtens2-0/+2 2015-12-17powerpc/pseries: Enable kernel CPU dlpar from sysfsNathan Fontenot1-0/+6 2015-12-17powerpc/pseries: Add CPU dlpar add functionalityNathan Fontenot1-0/+116 2015-12-17powerpc/pseries: Add CPU dlpar remove functionalityNathan Fontenot2-0/+156 2015-12-17powerpc/pseries: Update CPU hotplug error recoveryNathan Fontenot1-13/+63 2015-12-17powerpc/pseries: Factor out common cpu hotplug codeNathan Fontenot1-31/+39 2015-12-17powerpc/pseries: Consolidate CPU hotplug code to hotplug-cpu.cNathan Fontenot2-225/+219 2015-12-17powerpc/pseries: Verify CPU doesn't exist before addingNathan Fontenot1-4/+39 2015-12-17powerpc/476fpe: Add support for kexecAlistair Popple1-0/+2 2015-12-17powerpc/powernv: Add support for Nvlink NPUsAlistair Popple6-13/+502 2015-12-17powerpc: Add __raw_rm_writeq() functionAlistair Popple2-10/+11 2015-12-17Revert "powerpc/pci: Remove unused struct pci_dn.pcidev field"Alistair Popple2-0/+2 2015-12-17powerpc/powernv: Fix M64 resource name in /proc/iomemGavin Shan1-0/+1 2015-12-17powerpc/mm: Add page soft dirty trackingLaurent Dufour5-8/+56 2015-12-17powerpc/kernel: Combine vec/loc for STD_EXCEPTION_PSERIESMichael Ellerman2-10/+10 2015-12-17powerpc/kernel: Open code SET_DEFAULT_THREAD_PPRMichael Ellerman2-14/+7 2015-12-17powerpc/kernel: Open code HMT_MEDIUM_LOW_HAS_PPRMichael Ellerman2-6/+5 2015-12-17powerpc/kernel: Drop HMT_MEDIUM_PPR_DISCARDMichael Ellerman2-24/+0 2015-12-17powerpc/rtas: Make enter_rtas() privateMichael Ellerman2-1/+3 2015-12-17powerpc/rtas: Use rtas_call_unlocked() in call_rtas_display_status()Michael Ellerman1-10/+2 2015-12-17powerpc/pseries: Use rtas_call_unlocked() in pseries hotplugMichael Ellerman1-8/+3 2015-12-17powerpc/xmon: Use rtas_call_unlocked() in xmonMichael Ellerman1-10/+6 2015-12-17powerpc/rtas: Add rtas_call_unlocked()Michael Ellerman2-11/+35 2015-12-17powerpc/powernv: remove FW_FEATURE_OPALv3 and just use FW_FEATURE_OPALStewart Smith10-70/+54 2015-12-17powerpc/powernv: Remove OPALv2 firmware define and referencesStewart Smith4-15/+5 2015-12-17powerpc/powernv: panic() on OPAL < V3Stewart Smith1-4/+1