sched: Make sure window start passed to schedutil is consistent

The scheduler sends some notifications for individual CPUs. If these
events happen close to the window boundary, the window_start passed
to schedutil may go out of order.

Change-Id: Ib6338bd4bc3b1c41c424ec959056c57c0ed7507e
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
This commit is contained in:
Pavankumar Kondeti
2018-03-13 09:29:39 +05:30
parent ccf21f8533
commit d8c5bfcc07

View File

@@ -1870,7 +1870,7 @@ cpu_util_freq_walt(int cpu, struct sched_walt_cpu_load *walt_load)
walt_load->prev_window_util = util;
walt_load->nl = nl;
walt_load->pl = pl;
walt_load->ws = rq->window_start;
walt_load->ws = rq->load_reported_window;
}
return (util >= capacity) ? capacity : util;
@@ -2318,7 +2318,8 @@ static inline void cpufreq_update_util(struct rq *rq, unsigned int flags)
(rq->load_reported_window == rq->window_start) &&
!(flags & exception_flags))
return;
rq->load_reported_window = rq->window_start;
if (!(flags & exception_flags))
rq->load_reported_window = rq->window_start;
#endif
data = rcu_dereference_sched(*per_cpu_ptr(&cpufreq_update_util_data,