[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FE06EEF.2090709@linux.vnet.ibm.com>
Date: Tue, 19 Jun 2012 17:52:07 +0530
From: Prashanth Nageshappa <prashanth@...ux.vnet.ibm.com>
To: Peter Zijlstra <peterz@...radead.org>, mingo@...nel.org,
LKML <linux-kernel@...r.kernel.org>, roland@...nel.org,
Srivatsa Vaddagiri <vatsa@...ux.vnet.ibm.com>, efault@....de,
Ingo Molnar <mingo@...e.hu>
Subject: [PATCH] sched: reset loop counters if all tasks are pinned and we
need to redo load balance
While load balancing, if all tasks on the source runqueue are pinned,
we retry after excluding the corresponding source cpu. However, loop counters
env.loop and env.loop_break are not reset before retrying, which can lead
to failure in moving the tasks. In this patch we reset env.loop and
env.loop_break to their inital values before we retry.
Signed-off-by: Prashanth Nageshappa <prashanth@...ux.vnet.ibm.com>
---
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 939fd63..60f8b66 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4520,8 +4520,11 @@ more_balance:
/* All tasks on this runqueue were pinned by CPU affinity */
if (unlikely(env.flags & LBF_ALL_PINNED)) {
cpumask_clear_cpu(cpu_of(busiest), cpus);
- if (!cpumask_empty(cpus))
+ if (!cpumask_empty(cpus)) {
+ env.loop = 0;
+ env.loop_break = sched_nr_migrate_break;
goto redo;
+ }
goto out_balanced;
}
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists