diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-26 11:40:46 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-26 11:40:46 -0800 |
commit | 63ae0e5be34cb7593fc5f1135422129f765ac3ef (patch) | |
tree | 9ad9a84db71255793b60890683998527fd474769 /arch/mips/kernel/smp.c | |
parent | a22a0fab32e1216df56e4b9a577dc5c922cf7524 (diff) | |
parent | 2e8e2d49b14cce7bae910d22d59d2f282761e0d3 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] Fix port 0 mac address for mips mv6434x platforms
[SERIAL] serial_txx9 driver update
Revert "[PATCH] Generic ioremap_page_range: mips conversion"
[MIPS] Cobalt: Rename "Colo" MTD partition to "firmware".
[MIPS] SMP: Get smp_tune_scheduling to do something useful.
[MIPS] Add basic SMARTMIPS ASE support
Diffstat (limited to 'arch/mips/kernel/smp.c')
-rw-r--r-- | arch/mips/kernel/smp.c | 25 |
1 files changed, 4 insertions, 21 deletions
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 0555fc554f6..c46e479c992 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c @@ -51,31 +51,14 @@ int __cpu_logical_map[NR_CPUS]; /* Map logical to physical */ EXPORT_SYMBOL(phys_cpu_present_map); EXPORT_SYMBOL(cpu_online_map); +/* This happens early in bootup, can't really do it better */ static void smp_tune_scheduling (void) { struct cache_desc *cd = ¤t_cpu_data.scache; - unsigned long cachesize; /* kB */ - unsigned long cpu_khz; + unsigned long cachesize = cd->linesz * cd->sets * cd->ways; - /* - * Crude estimate until we actually meassure ... - */ - cpu_khz = loops_per_jiffy * 2 * HZ / 1000; - - /* - * Rough estimation for SMP scheduling, this is the number of - * cycles it takes for a fully memory-limited process to flush - * the SMP-local cache. - * - * (For a P5 this pretty much means we will choose another idle - * CPU almost always at wakeup time (this is due to the small - * L1 cache), on PIIs it's around 50-100 usecs, depending on - * the cache size) - */ - if (!cpu_khz) - return; - - cachesize = cd->linesz * cd->sets * cd->ways; + if (cachesize > max_cache_size) + max_cache_size = cachesize; } extern void __init calibrate_delay(void); |