summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorVikram Mulukutla <markivx@codeaurora.org>2017-06-06 11:58:27 -0700
committerGeorg Veichtlbauer <georg@vware.at>2023-07-16 12:47:43 +0200
commit6adb092856e806d91f3fc22dff0ef36506dd0bae (patch)
tree5f19cc4f680b0c21643621ae80607e66b36479c2 /kernel
parent0fa652ee00f5aaf9fdebea0e0f840e59bdb6795b (diff)
sched: cpufreq: Limit governor updates to WALT changes alone
It's not necessary to keep reporting load to the governor if it doesn't change in a window. Limit updates to when we expect load changes - after window rollover and when we send updates related to intercluster migrations. [beykerykt]: Adapt for HMP Change-Id: I3232d40f3d54b0b81cfafdcdb99b534df79327bf Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/hmp.c6
-rw-r--r--kernel/sched/sched.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/kernel/sched/hmp.c b/kernel/sched/hmp.c
index 1755e919f8f4..6a403be2ae7c 100644
--- a/kernel/sched/hmp.c
+++ b/kernel/sched/hmp.c
@@ -3663,8 +3663,10 @@ void fixup_busy_time(struct task_struct *p, int new_cpu)
migrate_top_tasks(p, src_rq, dest_rq);
if (!same_freq_domain(new_cpu, task_cpu(p))) {
- cpufreq_update_util(dest_rq, SCHED_CPUFREQ_INTERCLUSTER_MIG);
- cpufreq_update_util(src_rq, SCHED_CPUFREQ_INTERCLUSTER_MIG);
+ cpufreq_update_util(dest_rq, SCHED_CPUFREQ_INTERCLUSTER_MIG |
+ SCHED_CPUFREQ_WALT);
+ cpufreq_update_util(src_rq, SCHED_CPUFREQ_INTERCLUSTER_MIG |
+ SCHED_CPUFREQ_WALT);
}
if (p == src_rq->ed_task) {
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 90cc450dff7e..40da1a509ded 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -2856,8 +2856,10 @@ static inline void cpufreq_update_util(struct rq *rq, unsigned int flags)
#ifdef CONFIG_SCHED_HMP
/*
* Skip if we've already reported, but not if this is an inter-cluster
- * migration
+ * migration. Also only allow WALT update sites.
*/
+ if (!(flags & SCHED_CPUFREQ_WALT))
+ return;
if (!sched_disable_window_stats &&
(rq->load_reported_window == rq->window_start) &&
!(flags & SCHED_CPUFREQ_INTERCLUSTER_MIG))