• Andrew Morton's avatar
    [PATCH] Dynamically size the pidhash hash table. · 9a7dad1c
    Andrew Morton authored
    Patch from Bill Irwin.   Prodding from me.
    
    The hashtables in kernel/pid.c are 128 kbytes, which is far too large for
    very small machines.
    
    So we dynamically size them and allocate them from bootmem.  From 16 buckets
    on the very smallest machine up to 4096 buckets (effectively half the current
    size) with one gigabyte of memory or more.
    
    The patch also switches the hashing from a custom hash over to the more
    powerful hash_long().
    9a7dad1c
main.c 12.8 KB