summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGirish S Ghongdemath <girishsg@codeaurora.org>2014-04-03 12:54:37 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-23 19:58:48 -0700
commite6d5539f2e382b1ed8d9bd00068ce85a7d33e4de (patch)
tree23d5577695bd2c61828281d4f56bba2b8dc5633c /drivers
parentf117dea08fbaf057637529f2c15eba83f0f7deaa (diff)
cpufreq: cpu-boost: Consider only task load to decide on sync frequency
Currently we take the maximum between the source CPU frequency and the calculated frequency based on the migrating task load to decide on the frequency to sync the destination CPU to. This was done to handle short bursts in workloads of tasks which migrated immediately after causing a ramp up on the source CPU. Since their load history wasn't high enough, the destination CPU synced to a lower frequency which wasn't sufficient for the spike in workload. But as such cases are rare, taking the higher of source and calculated frequency can lead to destination CPU unnecessarily spending a considerable amount of time at higher frequencies which in turn can hurt power. With this change we make sure only the migrating task load is used to calculate the sync frequency for destination CPU when load based syncing is enabled. Change-Id: Ib1489d256c42ea7712aad2179aebffc87c549836 Signed-off-by: Girish Ghongdemath <girishsg@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cpufreq/cpu-boost.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpu-boost.c b/drivers/cpufreq/cpu-boost.c
index 617239cbfdea..3bd705812543 100644
--- a/drivers/cpufreq/cpu-boost.c
+++ b/drivers/cpufreq/cpu-boost.c
@@ -167,8 +167,9 @@ static int boost_mig_sync_thread(void *data)
if (ret)
continue;
- req_freq = max((dest_policy.max * s->task_load) / 100,
- src_policy.cur);
+ req_freq = load_based_syncs ?
+ (dest_policy.cpuinfo.max_freq * s->task_load) / 100 :
+ src_policy.cur;
if (req_freq <= dest_policy.cpuinfo.min_freq) {
pr_debug("No sync. Sync Freq:%u\n", req_freq);