Subject: Re: Lock benchmarks
To: None <tech-kern@netbsd.org>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 09/17/2002 19:46:08
On Tue, Sep 17, 2002 at 10:03:00AM +1200, Gregory McGarry wrote:

 > I'd appreciate receiving the timings on different CPUs.  I guess
 > the results are somewhat academic since there is marginally any
 > difference between the locking schemes.  But numbers are cool.

I added RAS support to the Alpha port so I could test this for
you, and here are the results.

This is a 533MHz EV56 (AlphaServer 1200):

frau-farbissina:thorpej 45$ ./lockprof
Registering restartable atomic sequences
Timing unlock overhead
Timing RAS locks
Timing CPU locks (inlined)
Timing CPU locks (not inlined)
unlock overhead: 0.379027 s (0.003790 us/loop)
RAS: 2.486118 s (0.024861 us/loop)
cpu locks (inlined): 11.724856 s (0.117249 us/loop)
cpu locks (not inlined): 11.813718 s (0.118137 us/loop)
frau-farbissina:thorpej 46$ 

This system is a multiprocessor machine, so the load-locked/store-conditional
stuff is definitely going to cause a fair bit of extra bus activity.  However,
this test was run with a uniprocessor kernel.

I might be able to test this again next week on a single-processor EV56
(AlphaPC 164) and maybe on a single-processor EV67 (API UP1000), but I'm
not going to make any promises :-)

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>