This stack check implementation leverages the compiler's profiling (gcc -p)
[linux-2.6.git] / kernel / pid.c
index a8b7eb3..1803836 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/hash.h>
+#include <linux/vs_cvirt.h>
 
 #define pid_hashfn(nr) hash_long((unsigned long)nr, pidhash_shift)
 static struct list_head *pid_hash[PIDTYPE_MAX];
@@ -274,7 +275,7 @@ void __init pidhash_init(void)
        int i, j, pidhash_size;
        unsigned long megabytes = max_pfn >> (20 - PAGE_SHIFT);
 
-       pidhash_shift = max(4, fls(megabytes * 4));
+       pidhash_shift = max(10, fls(megabytes * 4));
        pidhash_shift = min(12, pidhash_shift);
        pidhash_size = 1 << pidhash_shift;