Commit cafb20c1 authored by Nick Piggin's avatar Nick Piggin Committed by Linus Torvalds

[PATCH] sched: no aggressive idle balancing

Remove the very aggressive idle stuff that has recently gone into 2.6 - it is
going against the direction we are trying to go.  Hopefully we can regain
performance through other methods.
Signed-off-by: default avatarNick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a3f21bce
...@@ -82,7 +82,6 @@ static inline int node_to_first_cpu(int node) ...@@ -82,7 +82,6 @@ static inline int node_to_first_cpu(int node)
.flags = SD_LOAD_BALANCE \ .flags = SD_LOAD_BALANCE \
| SD_BALANCE_EXEC \ | SD_BALANCE_EXEC \
| SD_BALANCE_NEWIDLE \ | SD_BALANCE_NEWIDLE \
| SD_WAKE_IDLE \
| SD_WAKE_BALANCE, \ | SD_WAKE_BALANCE, \
.last_balance = jiffies, \ .last_balance = jiffies, \
.balance_interval = 1, \ .balance_interval = 1, \
......
...@@ -48,7 +48,6 @@ extern int __node_distance(int, int); ...@@ -48,7 +48,6 @@ extern int __node_distance(int, int);
.flags = SD_LOAD_BALANCE \ .flags = SD_LOAD_BALANCE \
| SD_BALANCE_NEWIDLE \ | SD_BALANCE_NEWIDLE \
| SD_BALANCE_EXEC \ | SD_BALANCE_EXEC \
| SD_WAKE_IDLE \
| SD_WAKE_BALANCE, \ | SD_WAKE_BALANCE, \
.last_balance = jiffies, \ .last_balance = jiffies, \
.balance_interval = 1, \ .balance_interval = 1, \
......
...@@ -127,7 +127,6 @@ ...@@ -127,7 +127,6 @@
| SD_BALANCE_NEWIDLE \ | SD_BALANCE_NEWIDLE \
| SD_BALANCE_EXEC \ | SD_BALANCE_EXEC \
| SD_WAKE_AFFINE \ | SD_WAKE_AFFINE \
| SD_WAKE_IDLE \
| SD_WAKE_BALANCE, \ | SD_WAKE_BALANCE, \
.last_balance = jiffies, \ .last_balance = jiffies, \
.balance_interval = 1, \ .balance_interval = 1, \
......
...@@ -414,22 +414,6 @@ static inline runqueue_t *this_rq_lock(void) ...@@ -414,22 +414,6 @@ static inline runqueue_t *this_rq_lock(void)
return rq; return rq;
} }
#ifdef CONFIG_SCHED_SMT
static int cpu_and_siblings_are_idle(int cpu)
{
int sib;
for_each_cpu_mask(sib, cpu_sibling_map[cpu]) {
if (idle_cpu(sib))
continue;
return 0;
}
return 1;
}
#else
#define cpu_and_siblings_are_idle(A) idle_cpu(A)
#endif
#ifdef CONFIG_SCHEDSTATS #ifdef CONFIG_SCHEDSTATS
/* /*
* Called when a process is dequeued from the active array and given * Called when a process is dequeued from the active array and given
...@@ -1652,12 +1636,11 @@ int can_migrate_task(task_t *p, runqueue_t *rq, int this_cpu, ...@@ -1652,12 +1636,11 @@ int can_migrate_task(task_t *p, runqueue_t *rq, int this_cpu,
/* /*
* Aggressive migration if: * Aggressive migration if:
* 1) the [whole] cpu is idle, or * 1) task is cache cold, or
* 2) too many balance attempts have failed. * 2) too many balance attempts have failed.
*/ */
if (cpu_and_siblings_are_idle(this_cpu) || \ if (sd->nr_balance_failed > sd->cache_nice_tries)
sd->nr_balance_failed > sd->cache_nice_tries)
return 1; return 1;
if (task_hot(p, rq->timestamp_last_tick, sd)) if (task_hot(p, rq->timestamp_last_tick, sd))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment