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

Commit 34f28ecd authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Ingo Molnar
Browse files

sched: optimize update_curr()



Impact: micro-optimization

Skip the hard work when there is none.

Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: default avatarMike Galbraith <efault@gmx.de>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 03e89e45
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -492,6 +492,8 @@ static void update_curr(struct cfs_rq *cfs_rq)
	 * overflow on 32 bits):
	 */
	delta_exec = (unsigned long)(now - curr->exec_start);
	if (!delta_exec)
		return;

	__update_curr(cfs_rq, curr, delta_exec);
	curr->exec_start = now;