From 681f3e68541d6f03e3e05d21fe15093578b8b539 Mon Sep 17 00:00:00 2001 From: Peter Williams Date: Wed, 24 Oct 2007 18:23:51 +0200 Subject: 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 Signed-off-by: Ingo Molnar --- kernel/sched_idletask.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'kernel/sched_idletask.c') diff --git a/kernel/sched_idletask.c b/kernel/sched_idletask.c index 586b06ca30a..bf9c25c15b8 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) { } +#ifdef CONFIG_SMP static unsigned long load_balance_idle(struct rq *this_rq, int this_cpu, struct rq *busiest, unsigned long max_load_move, @@ -52,6 +53,7 @@ move_one_task_idle(struct rq *this_rq, int this_cpu, struct rq *busiest, { return 0; } +#endif static void task_tick_idle(struct rq *rq, struct task_struct *curr) { @@ -76,8 +78,10 @@ const struct sched_class idle_sched_class = { .pick_next_task = pick_next_task_idle, .put_prev_task = put_prev_task_idle, +#ifdef CONFIG_SMP .load_balance = load_balance_idle, .move_one_task = move_one_task_idle, +#endif .set_curr_task = set_curr_task_idle, .task_tick = task_tick_idle, -- cgit v1.2.3-18-g5258