diff options
author | Lukasz Luba <lukasz.luba@arm.com> | 2023-12-21 02:17:51 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-12-29 20:01:00 +0300 |
commit | 879c9dc511732b74a04f11336e00f12783337a8a (patch) | |
tree | 8d9d143d92e7ba3ff2bc5c97e54ff938172a7578 /tools/perf/scripts/python/gecko.py | |
parent | e3ecd5716b957ff0e558e853d34be8d1e8173f64 (diff) | |
download | linux-879c9dc511732b74a04f11336e00f12783337a8a.tar.xz |
thermal/sysfs: Update instance->weight under tz lock
User space can change the weight of a thermal instance via sysfs while the
.throttle() callback is running for a governor, because weight_store()
does not use the zone lock.
The IPA governor uses instance weight values for power calculations and
caches the sum of them as total_weight, so it gets confused when one of
them changes while its .throttle() callback is running.
To prevent that from happening, use thermal zone locking in
weight_store().
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/perf/scripts/python/gecko.py')
0 files changed, 0 insertions, 0 deletions