Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933585AbZKXQ5v (ORCPT ); Tue, 24 Nov 2009 11:57:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933637AbZKXQ5s (ORCPT ); Tue, 24 Nov 2009 11:57:48 -0500 Received: from hera.kernel.org ([140.211.167.34]:60335 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933543AbZKXQ5o (ORCPT ); Tue, 24 Nov 2009 11:57:44 -0500 Date: Tue, 24 Nov 2009 16:56:36 GMT From: tip-bot for Tim Blechmann Cc: linux-kernel@vger.kernel.org, acme@redhat.com, paulus@samba.org, hpa@zytor.com, mingo@redhat.com, a.p.zijlstra@chello.nl, efault@gmx.de, fweisbec@gmail.com, tglx@linutronix.de, tim@klingt.org, mingo@elte.hu Reply-To: mingo@redhat.com, hpa@zytor.com, paulus@samba.org, acme@redhat.com, linux-kernel@vger.kernel.org, fweisbec@gmail.com, a.p.zijlstra@chello.nl, efault@gmx.de, tglx@linutronix.de, tim@klingt.org, mingo@elte.hu In-Reply-To: <4B0BBBB1.2050100@klingt.org> References: <4B0BBBB1.2050100@klingt.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:sched/core] sched: Optimize branch hint in pick_next_task_fair() Message-ID: Git-Commit-ID: 36ace27e3e60d44ea69ce394b2e45386ae98d9d9 X-Mailer: tip-git-log-daemon MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1557 Lines: 45 Commit-ID: 36ace27e3e60d44ea69ce394b2e45386ae98d9d9 Gitweb: http://git.kernel.org/tip/36ace27e3e60d44ea69ce394b2e45386ae98d9d9 Author: Tim Blechmann AuthorDate: Tue, 24 Nov 2009 11:55:45 +0100 Committer: Ingo Molnar CommitDate: Tue, 24 Nov 2009 12:18:12 +0100 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: Tim Blechmann Cc: Peter Zijlstra Cc: Mike Galbraith Cc: Paul Mackerras Cc: Arnaldo Carvalho de Melo Cc: Frederic Weisbecker LKML-Reference: <4B0BBBB1.2050100@klingt.org> Signed-off-by: Ingo Molnar --- kernel/sched_fair.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index f28a267..24086e7 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -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 { -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/