diff options
author | Vikram Mulukutla <markivx@codeaurora.org> | 2017-03-20 13:41:37 -0700 |
---|---|---|
committer | Michael Bestas <mkbestas@lineageos.org> | 2019-12-23 23:43:40 +0200 |
commit | 0086bc47f8b54d30de0ced09e9bb45cb4fef47a8 (patch) | |
tree | b5a24f13f592ac20770ddabbc640c7b9b4ec1c32 /kernel/sched/sched.h | |
parent | 5c43a2afb87ea44e4d52585989a76b1e6a2e6ce6 (diff) |
sched: cpufreq: HMP load reporting changes
Since HMP uses WALT, ensure that load is reported just once per window,
with the exception of intercluster migrations. Further, try to report load
whenever WALT stats are updated.
Change-Id: I6539f8c916f6f271cf26f03249de7f953d5b12c2
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Diffstat (limited to 'kernel/sched/sched.h')
-rw-r--r-- | kernel/sched/sched.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 0c121d8bd4c5..2315fbfcd64d 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -440,6 +440,7 @@ struct cpu_cycle { #define for_each_sched_cluster(cluster) \ list_for_each_entry_rcu(cluster, &cluster_head, list) +extern unsigned int sched_disable_window_stats; #endif /* CONFIG_SCHED_HMP */ /* CFS-related fields in a runqueue */ @@ -792,6 +793,7 @@ struct rq { int cstate, wakeup_latency, wakeup_energy; u64 window_start; + u64 load_reported_window; unsigned long hmp_flags; u64 cur_irqload; @@ -2852,6 +2854,18 @@ static inline void cpufreq_update_util(struct rq *rq, unsigned int flags) { struct update_util_data *data; +#ifdef CONFIG_SCHED_HMP + /* + * Skip if we've already reported, but not if this is an inter-cluster + * migration + */ + if (!sched_disable_window_stats && + (rq->load_reported_window == rq->window_start) && + !(flags & SCHED_CPUFREQ_INTERCLUSTER_MIG)) + return; + rq->load_reported_window = rq->window_start; +#endif + data = rcu_dereference_sched(*this_cpu_ptr(&cpufreq_update_util_data)); if (data) data->func(data, rq_clock(rq), flags); |