sched: WALT: fix window mis-alignment

The initial window start needs to be close to ktime ns = 0 to be
aligned with scheduler tick.

Change-Id: Ia91f74efce2f910106622a054a6fcd507e763ca5
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
This commit is contained in:
Joonwoo Park
2017-05-16 11:13:00 -07:00
committed by Amit Pundir
parent d5a3aedb50
commit 7530f3548d

View File

@@ -804,11 +804,11 @@ void walt_set_window_start(struct rq *rq)
int cpu = cpu_of(rq);
struct rq *sync_rq = cpu_rq(sync_cpu);
if (rq->window_start)
if (likely(rq->window_start))
return;
if (cpu == sync_cpu) {
rq->window_start = walt_ktime_clock();
rq->window_start = 1;
} else {
raw_spin_unlock(&rq->lock);
double_rq_lock(rq, sync_rq);