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

Commit 36ace27e authored by Tim Blechmann's avatar Tim Blechmann Committed by Ingo Molnar
Browse files

sched: Optimize branch hint in pick_next_task_fair()



Branch hint profiling on my nehalem machine showed 90%
incorrect branch hints:

  15728471 158903754  90 pick_next_task_fair
  sched_fair.c    1555

Signed-off-by: default avatarTim Blechmann <tim@klingt.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <4B0BBBB1.2050100@klingt.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 42994724
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1704,7 +1704,7 @@ static struct task_struct *pick_next_task_fair(struct rq *rq)
	struct cfs_rq *cfs_rq = &rq->cfs;
	struct sched_entity *se;

	if (unlikely(!cfs_rq->nr_running))
	if (!cfs_rq->nr_running)
		return NULL;

	do {