OSDN Git Service

sched: WALT: fix window mis-alignment
authorJoonwoo Park <joonwoop@codeaurora.org>
Tue, 16 May 2017 18:13:00 +0000 (11:13 -0700)
committerJoonwoo Park <joonwoop@codeaurora.org>
Sat, 2 Sep 2017 00:24:21 +0000 (17:24 -0700)
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>
kernel/sched/walt.c

index 166641e..28e9995 100644 (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);