summaryrefslogtreecommitdiffstats
path: root/Documentation/thermal
diff options
context:
space:
mode:
authorJavi Merino <javi.merino@arm.com>2015-02-18 17:04:25 +0100
committerEduardo Valentin <edubezval@gmail.com>2015-05-05 06:27:51 +0200
commitbcdcbbc71125c37195f97314f453ca9a3a4eb758 (patch)
tree886c2d24fab01346384d956f8f4c874a626ab3c7 /Documentation/thermal
parentthermal: export weight to sysfs (diff)
downloadlinux-bcdcbbc71125c37195f97314f453ca9a3a4eb758.tar.xz
linux-bcdcbbc71125c37195f97314f453ca9a3a4eb758.zip
thermal: fair_share: generalize the weight concept
The fair share governor has the concept of weights, which is the influence of each cooling device in a thermal zone. The current implementation forces the weights of all cooling devices in a thermal zone to add up to a 100. This complicates setups, as you need to know in advance how many cooling devices you are going to have. If you bind a new cooling device, you have to modify all the other cooling devices weights, which is error prone. Furthermore, you can't specify a "default" weight for platforms since that default value depends on the number of cooling devices in the platform. This patch generalizes the concept of weight by allowing any number to be a "weight". Weights are now relative to each other. Platforms that don't specify weights get the same default value for all their cooling devices, so all their cdevs are considered to be equally influential. It's important to note that previous users of the weights don't need to alter the code: percentages continue to work as they used to. This patch just removes the constraint of all the weights in a thermal zone having to add up to a 100. If they do, you get the same behavior as before. If they don't, fair share now works for that platform. Cc: Zhang Rui <rui.zhang@intel.com> Cc: Eduardo Valentin <edubezval@gmail.com> Cc: Durgadoss R <durgadoss.r@intel.com> Acked-by: Durgadoss R <durgadoss.r@intel.com> Signed-off-by: Javi Merino <javi.merino@arm.com> Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'Documentation/thermal')
-rw-r--r--Documentation/thermal/sysfs-api.txt12
1 files changed, 9 insertions, 3 deletions
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt
index 3625453ceef6..fc7dfe10778b 100644
--- a/Documentation/thermal/sysfs-api.txt
+++ b/Documentation/thermal/sysfs-api.txt
@@ -129,9 +129,15 @@ temperature) and throttle appropriate devices.
This structure defines the following parameters that are used to bind
a zone with a cooling device for a particular trip point.
.cdev: The cooling device pointer
- .weight: The 'influence' of a particular cooling device on this zone.
- This is on a percentage scale. The sum of all these weights
- (for a particular zone) cannot exceed 100.
+ .weight: The 'influence' of a particular cooling device on this
+ zone. This is relative to the rest of the cooling
+ devices. For example, if all cooling devices have a
+ weight of 1, then they all contribute the same. You can
+ use percentages if you want, but it's not mandatory. A
+ weight of 0 means that this cooling device doesn't
+ contribute to the cooling of this zone unless all cooling
+ devices have a weight of 0. If all weights are 0, then
+ they all contribute the same.
.trip_mask:This is a bit mask that gives the binding relation between
this thermal zone and cdev, for a particular trip point.
If nth bit is set, then the cdev and thermal zone are bound