aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched_rt.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_rt.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_rt.c')
-rw-r--r--kernel/sched_rt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index e9395b7119e6..8abd752a0ebd 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -98,6 +98,7 @@ static void put_prev_task_rt(struct rq *rq, struct task_struct *p)
98 p->se.exec_start = 0; 98 p->se.exec_start = 0;
99} 99}
100 100
101#ifdef CONFIG_SMP
101/* 102/*
102 * Load-balancing iterator. Note: while the runqueue stays locked 103 * Load-balancing iterator. Note: while the runqueue stays locked
103 * during the whole iteration, the current task might be 104 * during the whole iteration, the current task might be
@@ -202,6 +203,7 @@ move_one_task_rt(struct rq *this_rq, int this_cpu, struct rq *busiest,
202 return iter_move_one_task(this_rq, this_cpu, busiest, sd, idle, 203 return iter_move_one_task(this_rq, this_cpu, busiest, sd, idle,
203 &rt_rq_iterator); 204 &rt_rq_iterator);
204} 205}
206#endif
205 207
206static void task_tick_rt(struct rq *rq, struct task_struct *p) 208static void task_tick_rt(struct rq *rq, struct task_struct *p)
207{ 209{
@@ -245,8 +247,10 @@ const struct sched_class rt_sched_class = {
245 .pick_next_task = pick_next_task_rt, 247 .pick_next_task = pick_next_task_rt,
246 .put_prev_task = put_prev_task_rt, 248 .put_prev_task = put_prev_task_rt,
247 249
250#ifdef CONFIG_SMP
248 .load_balance = load_balance_rt, 251 .load_balance = load_balance_rt,
249 .move_one_task = move_one_task_rt, 252 .move_one_task = move_one_task_rt,
253#endif
250 254
251 .set_curr_task = set_curr_task_rt, 255 .set_curr_task = set_curr_task_rt,
252 .task_tick = task_tick_rt, 256 .task_tick = task_tick_rt,