aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorSuresh Siddha <suresh.b.siddha@intel.com>2007-07-19 15:28:35 -0400
committerIngo Molnar <mingo@elte.hu>2007-07-19 15:28:35 -0400
commit969bb4e4032dac67287951d8f6642a3b5119694e (patch)
tree2056749332226e750394001ec29d43514c14d0b6 /kernel/sched.c
parent9439aab8dbc33c2c03c3a19dba267360383ba38c (diff)
[PATCH] sched: fix the all pinned logic in load_balance_newidle()
nr_moved is not the correct check for triggering all pinned logic. Fix the all pinned logic in the case of load_balance_newidle(). Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index e36d99d1ddb1..a35a92ff38fd 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2679,6 +2679,7 @@ load_balance_newidle(int this_cpu, struct rq *this_rq, struct sched_domain *sd)
2679 unsigned long imbalance; 2679 unsigned long imbalance;
2680 int nr_moved = 0; 2680 int nr_moved = 0;
2681 int sd_idle = 0; 2681 int sd_idle = 0;
2682 int all_pinned = 0;
2682 cpumask_t cpus = CPU_MASK_ALL; 2683 cpumask_t cpus = CPU_MASK_ALL;
2683 2684
2684 /* 2685 /*
@@ -2717,10 +2718,11 @@ redo:
2717 double_lock_balance(this_rq, busiest); 2718 double_lock_balance(this_rq, busiest);
2718 nr_moved = move_tasks(this_rq, this_cpu, busiest, 2719 nr_moved = move_tasks(this_rq, this_cpu, busiest,
2719 minus_1_or_zero(busiest->nr_running), 2720 minus_1_or_zero(busiest->nr_running),
2720 imbalance, sd, CPU_NEWLY_IDLE, NULL); 2721 imbalance, sd, CPU_NEWLY_IDLE,
2722 &all_pinned);
2721 spin_unlock(&busiest->lock); 2723 spin_unlock(&busiest->lock);
2722 2724
2723 if (!nr_moved) { 2725 if (unlikely(all_pinned)) {
2724 cpu_clear(cpu_of(busiest), cpus); 2726 cpu_clear(cpu_of(busiest), cpus);
2725 if (!cpus_empty(cpus)) 2727 if (!cpus_empty(cpus))
2726 goto redo; 2728 goto redo;