sched: Clean up remnants of sd_idle

With the wholesale removal of the sd_idle SMT logic we can clean up
some more.

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Nikhil Rao <ncrao@google.com>
Cc: Venkatesh Pallipadi <venki@google.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Peter Zijlstra 2011-02-21 18:52:53 +01:00 committed by Ingo Molnar
parent d927dc9379
commit c186fafe9a

View File

@ -3150,25 +3150,23 @@ find_busiest_group(struct sched_domain *sd, int this_cpu,
if (sds.this_load >= sds.avg_load) if (sds.this_load >= sds.avg_load)
goto out_balanced; goto out_balanced;
/* if (idle == CPU_IDLE) {
* In the CPU_NEWLY_IDLE, use imbalance_pct to be conservative.
* And to check for busy balance use !idle_cpu instead of
* CPU_NOT_IDLE. This is because HT siblings will use CPU_NOT_IDLE
* even when they are idle.
*/
if (idle == CPU_NEWLY_IDLE || !idle_cpu(this_cpu)) {
if (100 * sds.max_load <= sd->imbalance_pct * sds.this_load)
goto out_balanced;
} else {
/* /*
* This cpu is idle. If the busiest group load doesn't * This cpu is idle. If the busiest group load doesn't
* have more tasks than the number of available cpu's and * have more tasks than the number of available cpu's and
* there is no imbalance between this and busiest group * there is no imbalance between this and busiest group
* wrt to idle cpu's, it is balanced. * wrt to idle cpu's, it is balanced.
*/ */
if ((sds.this_idle_cpus <= sds.busiest_idle_cpus + 1) && if ((sds.this_idle_cpus <= sds.busiest_idle_cpus + 1) &&
sds.busiest_nr_running <= sds.busiest_group_weight) sds.busiest_nr_running <= sds.busiest_group_weight)
goto out_balanced; goto out_balanced;
} else {
/*
* In the CPU_NEWLY_IDLE, CPU_NOT_IDLE cases, use
* imbalance_pct to be conservative.
*/
if (100 * sds.max_load <= sd->imbalance_pct * sds.this_load)
goto out_balanced;
} }
force_balance: force_balance:
@ -3862,8 +3860,7 @@ static void rebalance_domains(int cpu, enum cpu_idle_type idle)
if (load_balance(cpu, rq, sd, idle, &balance)) { if (load_balance(cpu, rq, sd, idle, &balance)) {
/* /*
* We've pulled tasks over so either we're no * We've pulled tasks over so either we're no
* longer idle, or one of our SMT siblings is * longer idle.
* not idle.
*/ */
idle = CPU_NOT_IDLE; idle = CPU_NOT_IDLE;
} }