summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2016-11-01 17:30:20 -0700
committerSyed Rameez Mustafa <rameezmustafa@codeaurora.org>2016-11-07 14:46:20 -0800
commitecd8f7800fc4aa3b62cfb01773d8e99d5bee228d (patch)
tree489c1999317c0151772660bdd71a2271418cf4b8 /kernel
parent54052c3658daebb1dfe5c4a78dd8a1eeb34694e4 (diff)
sched/hmp: Use improved information for frequency notifications
Recent changes to scheduler guided frequency have started reporting the maximum of the cpu load and the load of the top task on a CPU to the governor. Use the same information to determine whether a notification is necessary or not. Change-Id: I1928c6cd0509952443a912ef54e0d72d5f75955d Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/hmp.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/sched/hmp.c b/kernel/sched/hmp.c
index 102fd2c27cbc..b30aa78d9823 100644
--- a/kernel/sched/hmp.c
+++ b/kernel/sched/hmp.c
@@ -1814,6 +1814,7 @@ static void group_load_in_freq_domain(struct cpumask *cpus,
}
}
+static inline u64 freq_policy_load(struct rq *rq, u64 load);
/*
* Should scheduler alert governor for changing frequency?
*
@@ -1864,6 +1865,7 @@ static int send_notification(struct rq *rq, int check_pred, int check_groups)
_group_load_in_cpu(cpu_of(rq), &group_load, NULL);
new_load = rq->prev_runnable_sum + group_load;
+ new_load = freq_policy_load(rq, new_load);
raw_spin_unlock_irqrestore(&rq->lock, flags);
read_unlock(&related_thread_group_lock);
@@ -3338,7 +3340,7 @@ void sched_get_cpus_busy(struct sched_load *busy,
0);
account_load_subtractions(rq);
- load[i] = rq->old_busy_time = rq->prev_runnable_sum;
+ load[i] = rq->prev_runnable_sum;
nload[i] = rq->nt_prev_runnable_sum;
pload[i] = rq->hmp_stats.pred_demands_sum;
rq->old_estimated_time = pload[i];
@@ -3401,6 +3403,8 @@ void sched_get_cpus_busy(struct sched_load *busy,
nload[i] += ngload[i];
load[i] = freq_policy_load(rq, load[i]);
+ rq->old_busy_time = load[i];
+
/*
* Scale load in reference to cluster max_possible_freq.
*