From 3eac51aed030d9e3312c585c78f07df1f0fe062a Mon Sep 17 00:00:00 2001 From: Vikram Mulukutla Date: Fri, 31 Mar 2017 16:29:59 -0700 Subject: [PATCH] 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 --- kernel/sched/hmp.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/sched/hmp.c b/kernel/sched/hmp.c index 855f36bc89b4..ca4364066d4e 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;