]> git.neil.brown.name Git - history.git/commitdiff
If cache_decay_ticks is large enough, the migration
authorDavid S. Miller <davem@nuts.ninka.net>
Sun, 10 Mar 2002 23:12:17 +0000 (15:12 -0800)
committerDavid S. Miller <davem@nuts.ninka.net>
Sun, 10 Mar 2002 23:12:17 +0000 (15:12 -0800)
thread startup at boot time can fail.
Fix this by temporarily setting cache_decay_ticks
to zero around migration thread startup.

kernel/sched.c

index 95ae3dd48ab2136f7e28f9c04961ce794b300a74..73110e6a8abc2b7c527eb720bc8e688016583eb2 100644 (file)
@@ -1659,7 +1659,7 @@ repeat:
 
 void __init migration_init(void)
 {
-       unsigned long tmp;
+       unsigned long tmp, orig_cache_decay_ticks;
        int cpu;
 
        tmp = 0;
@@ -1672,6 +1672,9 @@ void __init migration_init(void)
 
        migration_mask = tmp;
 
+       orig_cache_decay_ticks = cache_decay_ticks;
+       cache_decay_ticks = 0;
+
        for (cpu = 0; cpu < smp_num_cpus; cpu++) {
                int logical = cpu_logical_map(cpu);
 
@@ -1680,5 +1683,7 @@ void __init migration_init(void)
        }
        if (migration_mask)
                BUG();
+
+       cache_decay_ticks = orig_cache_decay_ticks;
 }
 #endif