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>
This commit is contained in:
parent
f492e12ef0
commit
8f190fb3f7
|
@ -2465,7 +2465,7 @@ static inline void update_sg_lb_stats(struct sched_domain *sd,
|
||||||
* to do the newly idle load balance.
|
* to do the newly idle load balance.
|
||||||
*/
|
*/
|
||||||
if (idle != CPU_NEWLY_IDLE && local_group &&
|
if (idle != CPU_NEWLY_IDLE && local_group &&
|
||||||
balance_cpu != this_cpu && balance) {
|
balance_cpu != this_cpu) {
|
||||||
*balance = 0;
|
*balance = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -2528,7 +2528,7 @@ static inline void update_sd_lb_stats(struct sched_domain *sd, int this_cpu,
|
||||||
update_sg_lb_stats(sd, group, this_cpu, idle, load_idx, sd_idle,
|
update_sg_lb_stats(sd, group, this_cpu, idle, load_idx, sd_idle,
|
||||||
local_group, cpus, balance, &sgs);
|
local_group, cpus, balance, &sgs);
|
||||||
|
|
||||||
if (local_group && balance && !(*balance))
|
if (local_group && !(*balance))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
sds->total_load += sgs.group_load;
|
sds->total_load += sgs.group_load;
|
||||||
|
@ -2720,7 +2720,7 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
|
||||||
* 5) The imbalance is within the specified limit.
|
* 5) The imbalance is within the specified limit.
|
||||||
* 6) Any rebalance would lead to ping-pong
|
* 6) Any rebalance would lead to ping-pong
|
||||||
*/
|
*/
|
||||||
if (balance && !(*balance))
|
if (!(*balance))
|
||||||
goto ret;
|
goto ret;
|
||||||
|
|
||||||
if (!sds.busiest || sds.busiest_nr_running == 0)
|
if (!sds.busiest || sds.busiest_nr_running == 0)
|
||||||
|
|
Loading…
Reference in New Issue