aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_idletask.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_idletask.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_idletask.c')
-rw-r--r--kernel/sched_idletask.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched_idletask.c b/kernel/sched_idletask.c
index 586b06ca30aa..bf9c25c15b8b 100644
--- a/kernel/sched_idletask.c
+++ b/kernel/sched_idletask.c
@@ -37,6 +37,7 @@ static void put_prev_task_idle(struct rq *rq, struct task_struct *prev)
37{ 37{
38} 38}
39 39
40#ifdef CONFIG_SMP
40static unsigned long 41static unsigned long
41load_balance_idle(struct rq *this_rq, int this_cpu, struct rq *busiest, 42load_balance_idle(struct rq *this_rq, int this_cpu, struct rq *busiest,
42 unsigned long max_load_move, 43 unsigned long max_load_move,
@@ -52,6 +53,7 @@ move_one_task_idle(struct rq *this_rq, int this_cpu, struct rq *busiest,
52{ 53{
53 return 0; 54 return 0;
54} 55}
56#endif
55 57
56static void task_tick_idle(struct rq *rq, struct task_struct *curr) 58static void task_tick_idle(struct rq *rq, struct task_struct *curr)
57{ 59{
@@ -76,8 +78,10 @@ const struct sched_class idle_sched_class = {
76 .pick_next_task = pick_next_task_idle, 78 .pick_next_task = pick_next_task_idle,
77 .put_prev_task = put_prev_task_idle, 79 .put_prev_task = put_prev_task_idle,
78 80
81#ifdef CONFIG_SMP
79 .load_balance = load_balance_idle, 82 .load_balance = load_balance_idle,
80 .move_one_task = move_one_task_idle, 83 .move_one_task = move_one_task_idle,
84#endif
81 85
82 .set_curr_task = set_curr_task_idle, 86 .set_curr_task = set_curr_task_idle,
83 .task_tick = task_tick_idle, 87 .task_tick = task_tick_idle,