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

Commit ab2ff007 authored by Srivatsa Vaddagiri's avatar Srivatsa Vaddagiri
Browse files

sched: update_rq_clock() must skip ONE update



Prevent large wakeup latencies from being accounted to the wrong task.

Change-Id: Ie9932acb8a733989441ff2dd51c50a2626cfe5c5
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarMike Galbraith <umgwanakikbuti@gmail.com>
CRs-Fixed: 755576
Patch-mainline: http://permalink.gmane.org/gmane.linux.kernel/1677324


Signed-off-by: default avatarSrivatsa Vaddagiri <vatsa@codeaurora.org>
parent 5d7a7415
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -166,7 +166,12 @@ void update_rq_clock(struct rq *rq)
{
	s64 delta;

	if (rq->skip_clock_update > 0)
	/*
	 * Set during wakeup to indicate we are on the way to schedule().
	 * Decrement to ensure that a very large latency is not accounted
	 * to the wrong task.
	 */
	if (rq->skip_clock_update-- > 0)
		return;

	delta = sched_clock_cpu(cpu_of(rq)) - rq->clock;