aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 346f27f4c79..b4e6f32de45 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