aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorPeter Williams <pwil3058@bigpond.net.au>2007-10-24 12:23:51 -0400
committerIngo Molnar <mingo@elte.hu>2007-10-24 12:23:51 -0400
commit681f3e68541d6f03e3e05d21fe15093578b8b539 (patch)
tree82e13a7b15a2bb15233ba964dd1eb352b007cae4 /kernel/sched_fair.c
parente1d1484f72127a5580d37c379f6a5b2c2786434c (diff)
sched: isolate SMP balancing code a bit more
At the moment, a lot of load balancing code that is irrelevant to non SMP systems gets included during non SMP builds. This patch addresses this issue and reduces the binary size on non SMP systems: text data bss dec hex filename 10983 28 1192 12203 2fab sched.o.before 10739 28 1192 11959 2eb7 sched.o.after Signed-off-by: Peter Williams <pwil3058@bigpond.net.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r--kernel/sched_fair.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index a90d0457d603..9971831b560e 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -876,6 +876,7 @@ static void put_prev_task_fair(struct rq *rq, struct task_struct *prev)
876 } 876 }
877} 877}
878 878
879#ifdef CONFIG_SMP
879/************************************************** 880/**************************************************
880 * Fair scheduling class load-balancing methods: 881 * Fair scheduling class load-balancing methods:
881 */ 882 */
@@ -1008,6 +1009,7 @@ move_one_task_fair(struct rq *this_rq, int this_cpu, struct rq *busiest,
1008 1009
1009 return 0; 1010 return 0;
1010} 1011}
1012#endif
1011 1013
1012/* 1014/*
1013 * scheduler tick hitting a task of our scheduling class: 1015 * scheduler tick hitting a task of our scheduling class:
@@ -1084,8 +1086,10 @@ static const struct sched_class fair_sched_class = {
1084 .pick_next_task = pick_next_task_fair, 1086 .pick_next_task = pick_next_task_fair,
1085 .put_prev_task = put_prev_task_fair, 1087 .put_prev_task = put_prev_task_fair,
1086 1088
1089#ifdef CONFIG_SMP
1087 .load_balance = load_balance_fair, 1090 .load_balance = load_balance_fair,
1088 .move_one_task = move_one_task_fair, 1091 .move_one_task = move_one_task_fair,
1092#endif
1089 1093
1090 .set_curr_task = set_curr_task_fair, 1094 .set_curr_task = set_curr_task_fair,
1091 .task_tick = task_tick_fair, 1095 .task_tick = task_tick_fair,