patch-2.2.16 linux/arch/i386/kernel/smp.c

Next file: linux/arch/i386/kernel/time.c
Previous file: linux/arch/i386/kernel/setup.c
Back to the patch index
Back to the overall index

diff -urN v2.2.15/linux/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
@@ -1358,7 +1358,7 @@
 }
 
 cycles_t cacheflush_time;
-extern unsigned long cpu_hz;
+extern unsigned long cpu_khz;
 
 static void smp_tune_scheduling (void)
 {
@@ -1374,7 +1374,7 @@
 	 *  the cache size)
 	 */
 
-	if (!cpu_hz) {
+	if (!cpu_khz) {
 		/*
 		 * this basically disables processor-affinity
 		 * scheduling on SMP without a TSC.
@@ -1386,12 +1386,12 @@
 		if (cachesize == -1)
 			cachesize = 8; /* Pentiums */
 
-		cacheflush_time = cpu_hz/1024*cachesize/5000;
+		cacheflush_time = cpu_khz/1024*cachesize/5;
 	}
 
 	printk("per-CPU timeslice cutoff: %ld.%02ld usecs.\n",
-		(long)cacheflush_time/(cpu_hz/1000000),
-		((long)cacheflush_time*100/(cpu_hz/1000000)) % 100);
+		(long)cacheflush_time/(cpu_khz/1000),
+		((long)cacheflush_time*100/(cpu_khz/1000)) % 100);
 }
 
 unsigned int prof_multiplier[NR_CPUS];

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)