aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-12-06 20:14:19 -0500
committerAndi Kleen <andi@basil.nowhere.org>2006-12-06 20:14:19 -0500
commitd9408cefe677636bc1c100fdcfac0b2ab9ff87bf (patch)
tree5f042bdcea216867e93d38d12decfd66e4612a2d
parentb65780e123ba9b762276482bbfb52836e4d41fd9 (diff)
[PATCH] i386: Clean up smp_tune_scheduling()
- remove the write-only local variable "bandwidth" - don't set "max_cache_size" in the (cachesize < 0) case: that's already handled in kernel/sched.c:measure_migration_cost() Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andi Kleen <ak@suse.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org>
-rw-r--r--arch/i386/kernel/smpboot.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index 346f27f4c79f..b4e6f32de453 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -1130,34 +1130,15 @@ exit:
1130} 1130}
1131#endif 1131#endif
1132 1132
1133static void smp_tune_scheduling (void) 1133static void smp_tune_scheduling(void)
1134{ 1134{
1135 unsigned long cachesize; /* kB */ 1135 unsigned long cachesize; /* kB */
1136 unsigned long bandwidth = 350; /* MB/s */
1137 /*
1138 * Rough estimation for SMP scheduling, this is the number of
1139 * cycles it takes for a fully memory-limited process to flush
1140 * the SMP-local cache.
1141 *
1142 * (For a P5 this pretty much means we will choose another idle
1143 * CPU almost always at wakeup time (this is due to the small
1144 * L1 cache), on PIIs it's around 50-100 usecs, depending on
1145 * the cache size)
1146 */
1147 1136
1148 if (!cpu_khz) { 1137 if (cpu_khz) {
1149 /*
1150 * this basically disables processor-affinity
1151 * scheduling on SMP without a TSC.
1152 */
1153 return;
1154 } else {
1155 cachesize = boot_cpu_data.x86_cache_size; 1138 cachesize = boot_cpu_data.x86_cache_size;
1156 if (cachesize == -1) { 1139
1157 cachesize = 16; /* Pentiums, 2x8kB cache */ 1140 if (cachesize > 0)
1158 bandwidth = 100; 1141 max_cache_size = cachesize * 1024;
1159 }
1160 max_cache_size = cachesize * 1024;
1161 } 1142 }
1162} 1143}
1163 1144