Re: Spinlocks, yet again: analysis and proposed patches - Mailing list pgsql-hackers

From Mark Kirkwood
Subject Re: Spinlocks, yet again: analysis and proposed patches
Date
Msg-id 43250BB3.8020705@paradise.net.nz
Whole thread Raw
In response to Spinlocks, yet again: analysis and proposed patches  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tom Lane wrote:

> I attach two proposed patches: the first removes the cmpb/jne from
> the x86 TAS assembly code, and the second one does the s_lock changes
> enumerated as points #2, #3, #4.  The first one in particular needs
> more testing to see if it hurts performance on any non-Opteron x86
> chips.  (If so, we'd just make it conditional to x86_64.)
> 

2x PIII 1G 2G Freebsd 6.0Beta4

8.1beta1 (2005-08-28):

N runtime: 1 85s   2 139s  4 220s


8.1beta1 (2005-08-28) + patch 1 (s_lock.h only)

N runtime: 1 89s   2 137s  4 229s


8.1beta1 (2005-08-28) + patch 2

N runtime: 1 84s   2 108s  4 214s



Observe the interesting little speed improvement for patch 2 with 2 
processes (seems to be repeatable).

Let me know if you want to see vmstat output for any of these.

regards

Mark




pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Spinlocks, yet again: analysis and proposed patches
Next
From: Martijn van Oosterhout
Date:
Subject: Re: -fPIC