• Andrew Morton's avatar
    [PATCH] /dev/urandom scalability improvement · 47b54fbf
    Andrew Morton authored
    From: David Mosberger <davidm@napali.hpl.hp.com>
    
    Somebody recently pointed out a performance-anomaly to me where an unusual
    amount of time was being spent reading from /dev/urandom.  The problem
    isn't really surprising as it happened only on >= 4-way machines and the
    random driver isn't terribly scalable the way it is written today.  If
    scalability _really_ mattered, I suppose per-CPU data structures would be
    the way to go.  However, I found that at least for 4-way machines,
    performance can be improved considerably with the attached patch.  In
    particular, I saw the following performance on a 4-way ia64 machine:
    
    Test: 3 tasks running "dd if=/dev/urandom of=/dev/null bs=1024":
    
    			throughput:
    			
    47b54fbf
random.c 74.2 KB