summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/smpboot.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-02-18 22:06:10 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-02-18 22:06:10 +0000
commitaba4e552a2f2c1492441acbccedd8e0a4c53f916 (patch)
tree23921efb2b4af590160f034a89ff3da2ecca6e47 /arch/i386/kernel/smpboot.c
parent9e17e1aa1cf1cb497d2f67147a51831888affcf3 (diff)
Merge with Linux 2.3.43.
Diffstat (limited to 'arch/i386/kernel/smpboot.c')
-rw-r--r--arch/i386/kernel/smpboot.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c
index 3ff5cc002..50b743a99 100644
--- a/arch/i386/kernel/smpboot.c
+++ b/arch/i386/kernel/smpboot.c
@@ -710,7 +710,8 @@ extern unsigned long cpu_hz;
static void smp_tune_scheduling (void)
{
- unsigned long cachesize;
+ unsigned long cachesize; /* kB */
+ unsigned long bandwidth = 350; /* MB/s */
/*
* Rough estimation for SMP scheduling, this is the number of
* cycles it takes for a fully memory-limited process to flush
@@ -731,10 +732,12 @@ static void smp_tune_scheduling (void)
return;
} else {
cachesize = boot_cpu_data.x86_cache_size;
- if (cachesize == -1)
- cachesize = 8; /* Pentiums */
+ if (cachesize == -1) {
+ cachesize = 16; /* Pentiums, 2x8kB cache */
+ bandwidth = 100;
+ }
- cacheflush_time = cpu_hz/1024*cachesize/5000;
+ cacheflush_time = (cpu_hz>>20) * (cachesize<<10) / bandwidth;
}
printk("per-CPU timeslice cutoff: %ld.%02ld usecs.\n",