[PATCH] [3/4] SCHED: don't inline idle_balance into schedule()

From: Andi Kleen
Date: Wed Nov 12 2008 - 07:28:46 EST



This function is not called under load, so it makes sense to out of line
it to get better register allocation in schedule() and make the assembler
easier to read.

Signed-off-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>

---
kernel/sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6.28-rc4-test/kernel/sched.c
===================================================================
--- linux-2.6.28-rc4-test.orig/kernel/sched.c 2008-11-12 12:52:52.000000000 +0100
+++ linux-2.6.28-rc4-test/kernel/sched.c 2008-11-12 13:07:53.000000000 +0100
@@ -3696,7 +3696,7 @@
* idle_balance is called by schedule() if this_cpu is about to become
* idle. Attempts to pull tasks from other CPUs.
*/
-static void idle_balance(int this_cpu, struct rq *this_rq)
+static void noinline idle_balance(int this_cpu, struct rq *this_rq)
{
struct sched_domain *sd;
int pulled_task = -1;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/