• Nick Piggin's avatar
    [PATCH] use hlist for pid hash · f59ad67e
    Nick Piggin authored
    Use hlists for the PID hashes.  This halves the memory footprint of these
    hashes.  No benchmarks, but I think this is a worthy improvement because
    the hashes are something that would be likely to have significant portions
    loaded into the cache of every CPU on some workloads.
    
    This comes at the "expense" of
    	1. reintroducing the memory  prefetch into the hash traversal loop;
    	2. adding new pids to the head of the list instead of the tail. I
    	   suspect that if this was a big problem then the hash isn't sized
    	   well or could benefit from moving hot entries to the head.
    
    Also, account for all the pid hashes when reporting hash memory usage.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    f59ad67e
pid.c 7.56 KB