Commit 650fb838 authored by Krzysztof Helt's avatar Krzysztof Helt Committed by David S. Miller

[SPARC]: Migration cost tune up in sparc smp.

This patch sets the max_cache_size value required to tune up
scheduler in SMP systems. Otherwise, the calculated
migration_cost is too high and task scheduling may lock up.
Signed-off-by: default avatarKrzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9145bcf6
...@@ -69,6 +69,17 @@ void __init smp_store_cpu_info(int id) ...@@ -69,6 +69,17 @@ void __init smp_store_cpu_info(int id)
"clock-frequency", 0); "clock-frequency", 0);
cpu_data(id).prom_node = cpu_node; cpu_data(id).prom_node = cpu_node;
cpu_data(id).mid = cpu_get_hwmid(cpu_node); cpu_data(id).mid = cpu_get_hwmid(cpu_node);
/* this is required to tune the scheduler correctly */
/* is it possible to have CPUs with different cache sizes? */
if (id == boot_cpu_id) {
int cache_line,cache_nlines;
cache_line = 0x20;
cache_line = prom_getintdefault(cpu_node, "ecache-line-size", cache_line);
cache_nlines = 0x8000;
cache_nlines = prom_getintdefault(cpu_node, "ecache-nlines", cache_nlines);
max_cache_size = cache_line * cache_nlines;
}
if (cpu_data(id).mid < 0) if (cpu_data(id).mid < 0)
panic("No MID found for CPU%d at node 0x%08d", id, cpu_node); panic("No MID found for CPU%d at node 0x%08d", id, cpu_node);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment