diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2009-12-24 08:18:21 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-01-21 07:40:15 -0500 |
commit | 8f190fb3f7a405682666d3723f6ec370b5afe4da (patch) | |
tree | 4494079705c3c18e5e4f48c5a77877677b244d5d /kernel/sched_fair.c | |
parent | f492e12ef050e02bf0185b6b57874992591b9be1 (diff) |
sched: Assume *balance is valid
Since all load_balance() callers will have !NULL balance parameters we
can now assume so and remove a few checks.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index de5ab1239e04..0b482f5b5b3b 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -2465,7 +2465,7 @@ static inline void update_sg_lb_stats(struct sched_domain *sd, | |||
2465 | * to do the newly idle load balance. | 2465 | * to do the newly idle load balance. |
2466 | */ | 2466 | */ |
2467 | if (idle != CPU_NEWLY_IDLE && local_group && | 2467 | if (idle != CPU_NEWLY_IDLE && local_group && |
2468 | balance_cpu != this_cpu && balance) { | 2468 | balance_cpu != this_cpu) { |
2469 | *balance = 0; | 2469 | *balance = 0; |
2470 | return; | 2470 | return; |
2471 | } | 2471 | } |
@@ -2528,7 +2528,7 @@ static inline void update_sd_lb_stats(struct sched_domain *sd, int this_cpu, | |||
2528 | update_sg_lb_stats(sd, group, this_cpu, idle, load_idx, sd_idle, | 2528 | update_sg_lb_stats(sd, group, this_cpu, idle, load_idx, sd_idle, |
2529 | local_group, cpus, balance, &sgs); | 2529 | local_group, cpus, balance, &sgs); |
2530 | 2530 | ||
2531 | if (local_group && balance && !(*balance)) | 2531 | if (local_group && !(*balance)) |
2532 | return; | 2532 | return; |
2533 | 2533 | ||
2534 | sds->total_load += sgs.group_load; | 2534 | sds->total_load += sgs.group_load; |
@@ -2720,7 +2720,7 @@ find_busiest_group(struct sched_domain *sd, int this_cpu, | |||
2720 | * 5) The imbalance is within the specified limit. | 2720 | * 5) The imbalance is within the specified limit. |
2721 | * 6) Any rebalance would lead to ping-pong | 2721 | * 6) Any rebalance would lead to ping-pong |
2722 | */ | 2722 | */ |
2723 | if (balance && !(*balance)) | 2723 | if (!(*balance)) |
2724 | goto ret; | 2724 | goto ret; |
2725 | 2725 | ||
2726 | if (!sds.busiest || sds.busiest_nr_running == 0) | 2726 | if (!sds.busiest || sds.busiest_nr_running == 0) |