diff options
author | Nick Piggin <nickpiggin@yahoo.com.au> | 2005-06-25 17:57:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:24:42 -0400 |
commit | cafb20c1f9976a70d633bb1e1c8c24eab00e4e80 (patch) | |
tree | 7ff8e6060990889992d51d542abde31cf0d7a1ef | |
parent | a3f21bce1fefdf92a4d1705e888d390b10f3ac6f (diff) |
[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: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | include/asm-i386/topology.h | 1 | ||||
-rw-r--r-- | include/asm-x86_64/topology.h | 1 | ||||
-rw-r--r-- | include/linux/topology.h | 1 | ||||
-rw-r--r-- | kernel/sched.c | 21 |
4 files changed, 2 insertions, 22 deletions
diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index 0055fbfeec7b..5eb6f61dcefc 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h | |||
@@ -82,7 +82,6 @@ static inline int node_to_first_cpu(int node) | |||
82 | .flags = SD_LOAD_BALANCE \ | 82 | .flags = SD_LOAD_BALANCE \ |
83 | | SD_BALANCE_EXEC \ | 83 | | SD_BALANCE_EXEC \ |
84 | | SD_BALANCE_NEWIDLE \ | 84 | | SD_BALANCE_NEWIDLE \ |
85 | | SD_WAKE_IDLE \ | ||
86 | | SD_WAKE_BALANCE, \ | 85 | | SD_WAKE_BALANCE, \ |
87 | .last_balance = jiffies, \ | 86 | .last_balance = jiffies, \ |
88 | .balance_interval = 1, \ | 87 | .balance_interval = 1, \ |
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index fe8d80a15751..9cb7459ce722 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h | |||
@@ -48,7 +48,6 @@ extern int __node_distance(int, int); | |||
48 | .flags = SD_LOAD_BALANCE \ | 48 | .flags = SD_LOAD_BALANCE \ |
49 | | SD_BALANCE_NEWIDLE \ | 49 | | SD_BALANCE_NEWIDLE \ |
50 | | SD_BALANCE_EXEC \ | 50 | | SD_BALANCE_EXEC \ |
51 | | SD_WAKE_IDLE \ | ||
52 | | SD_WAKE_BALANCE, \ | 51 | | SD_WAKE_BALANCE, \ |
53 | .last_balance = jiffies, \ | 52 | .last_balance = jiffies, \ |
54 | .balance_interval = 1, \ | 53 | .balance_interval = 1, \ |
diff --git a/include/linux/topology.h b/include/linux/topology.h index ae9c2216dfa6..b23ec64df7f1 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -127,7 +127,6 @@ | |||
127 | | SD_BALANCE_NEWIDLE \ | 127 | | SD_BALANCE_NEWIDLE \ |
128 | | SD_BALANCE_EXEC \ | 128 | | SD_BALANCE_EXEC \ |
129 | | SD_WAKE_AFFINE \ | 129 | | SD_WAKE_AFFINE \ |
130 | | SD_WAKE_IDLE \ | ||
131 | | SD_WAKE_BALANCE, \ | 130 | | SD_WAKE_BALANCE, \ |
132 | .last_balance = jiffies, \ | 131 | .last_balance = jiffies, \ |
133 | .balance_interval = 1, \ | 132 | .balance_interval = 1, \ |
diff --git a/kernel/sched.c b/kernel/sched.c index 5ae3568eed0b..396724a2519f 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -414,22 +414,6 @@ static inline runqueue_t *this_rq_lock(void) | |||
414 | return rq; | 414 | return rq; |
415 | } | 415 | } |
416 | 416 | ||
417 | #ifdef CONFIG_SCHED_SMT | ||
418 | static int cpu_and_siblings_are_idle(int cpu) | ||
419 | { | ||
420 | int sib; | ||
421 | for_each_cpu_mask(sib, cpu_sibling_map[cpu]) { | ||
422 | if (idle_cpu(sib)) | ||
423 | continue; | ||
424 | return 0; | ||
425 | } | ||
426 | |||
427 | return 1; | ||
428 | } | ||
429 | #else | ||
430 | #define cpu_and_siblings_are_idle(A) idle_cpu(A) | ||
431 | #endif | ||
432 | |||
433 | #ifdef CONFIG_SCHEDSTATS | 417 | #ifdef CONFIG_SCHEDSTATS |
434 | /* | 418 | /* |
435 | * Called when a process is dequeued from the active array and given | 419 | * 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 | 1636 | ||
1653 | /* | 1637 | /* |
1654 | * Aggressive migration if: | 1638 | * Aggressive migration if: |
1655 | * 1) the [whole] cpu is idle, or | 1639 | * 1) task is cache cold, or |
1656 | * 2) too many balance attempts have failed. | 1640 | * 2) too many balance attempts have failed. |
1657 | */ | 1641 | */ |
1658 | 1642 | ||
1659 | if (cpu_and_siblings_are_idle(this_cpu) || \ | 1643 | if (sd->nr_balance_failed > sd->cache_nice_tries) |
1660 | sd->nr_balance_failed > sd->cache_nice_tries) | ||
1661 | return 1; | 1644 | return 1; |
1662 | 1645 | ||
1663 | if (task_hot(p, rq->timestamp_last_tick, sd)) | 1646 | if (task_hot(p, rq->timestamp_last_tick, sd)) |