diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2008-10-22 03:25:26 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-22 04:01:52 -0400 |
commit | 4ce72a2c063a7fa8e42a9435440ae3364115a58d (patch) | |
tree | 427b25960945524a205c7d8ed20ed5f02325175e /kernel/sched_fair.c | |
parent | 0c4b83da58ec2e96ce9c44c211d6eac5f9dae478 (diff) |
sched: add CONFIG_SMP consistency
a patch from Henrik Austad did this:
>> Do not declare select_task_rq as part of sched_class when CONFIG_SMP is
>> not set.
Peter observed:
> While a proper cleanup, could you do it by re-arranging the methods so
> as to not create an additional ifdef?
Do not declare select_task_rq and some other methods as part of sched_class
when CONFIG_SMP is not set.
Also gather those methods to avoid CONFIG_SMP mess.
Idea-by: Henrik Austad <henrik.austad@gmail.com>
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Henrik Austad <henrik@austad.us>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index a0aa38b10fdd..8de48a5da354 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -1593,9 +1593,6 @@ static const struct sched_class fair_sched_class = { | |||
1593 | .enqueue_task = enqueue_task_fair, | 1593 | .enqueue_task = enqueue_task_fair, |
1594 | .dequeue_task = dequeue_task_fair, | 1594 | .dequeue_task = dequeue_task_fair, |
1595 | .yield_task = yield_task_fair, | 1595 | .yield_task = yield_task_fair, |
1596 | #ifdef CONFIG_SMP | ||
1597 | .select_task_rq = select_task_rq_fair, | ||
1598 | #endif /* CONFIG_SMP */ | ||
1599 | 1596 | ||
1600 | .check_preempt_curr = check_preempt_wakeup, | 1597 | .check_preempt_curr = check_preempt_wakeup, |
1601 | 1598 | ||
@@ -1603,6 +1600,8 @@ static const struct sched_class fair_sched_class = { | |||
1603 | .put_prev_task = put_prev_task_fair, | 1600 | .put_prev_task = put_prev_task_fair, |
1604 | 1601 | ||
1605 | #ifdef CONFIG_SMP | 1602 | #ifdef CONFIG_SMP |
1603 | .select_task_rq = select_task_rq_fair, | ||
1604 | |||
1606 | .load_balance = load_balance_fair, | 1605 | .load_balance = load_balance_fair, |
1607 | .move_one_task = move_one_task_fair, | 1606 | .move_one_task = move_one_task_fair, |
1608 | #endif | 1607 | #endif |