summaryrefslogtreecommitdiff
path: root/kernel/sched/hmp.c
diff options
context:
space:
mode:
authorVikram Mulukutla <markivx@codeaurora.org>2017-03-31 16:29:59 -0700
committerMichael Bestas <mkbestas@lineageos.org>2019-12-23 23:43:40 +0200
commit3562029b39c9ad530814f853581a3ed9b227f451 (patch)
tree71651b30461291d8cd2c9079101e689e4463c6ba /kernel/sched/hmp.c
parent0086bc47f8b54d30de0ced09e9bb45cb4fef47a8 (diff)
sched: hmp: Reduce number of load reports in a window
There's no use reporting load more than once in a window via the cpufreq_update_util path (unless there's a migration). Set the load_reported_window flag in sched_get_cpus_busy to remove these redundant updates. Change-Id: If43dd5abc7e0e52a8e0f0df3a20ca99ed92f5361 Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Diffstat (limited to 'kernel/sched/hmp.c')
-rw-r--r--kernel/sched/hmp.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/sched/hmp.c b/kernel/sched/hmp.c
index ac9c93bc45fc..598656b42203 100644
--- a/kernel/sched/hmp.c
+++ b/kernel/sched/hmp.c
@@ -3217,6 +3217,13 @@ void sched_get_cpus_busy(struct sched_load *busy,
update_task_ravg(rq->curr, rq, TASK_UPDATE, sched_ktime_clock(),
0);
+ /*
+ * Ensure that we don't report load for 'cpu' again via the
+ * cpufreq_update_util path in the window that started at
+ * rq->window_start
+ */
+ rq->load_reported_window = rq->window_start;
+
account_load_subtractions(rq);
load[i] = rq->prev_runnable_sum;
nload[i] = rq->nt_prev_runnable_sum;