Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98a5fa3b authored by Joonwoo Park's avatar Joonwoo Park Committed by Todd Kjos
Browse files

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: default avatarJoonwoo Park <joonwoop@codeaurora.org>
(cherry picked from commit 0caf1df0c520325c9352149795266709e989b222)
Signed-off-by: default avatarQuentin Perret <quentin.perret@arm.com>
parent cd76b215
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -805,11 +805,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);