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

From Kurt Roeckx
Subject Re: Spinlocks, yet again: analysis and proposed patches
Date
Msg-id 20050911222346.GA27800@roeckx.be
Whole thread Raw
In response to Spinlocks, yet again: analysis and proposed patches  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Spinlocks, yet again: analysis and proposed patches
List pgsql-hackers
On Sun, Sep 11, 2005 at 05:59:49PM -0400, Tom Lane wrote:
> 
> I kinda suspect that the cmpb test is a no-op or loss on all
> Intelish processors: it can only be a win if you expect a lot
> of contention for the spin lock, but in percentage terms we still
> have a very low conflict rate, so in most executions of the TAS
> macro, the cmpb is just wasted cycles.  Bottom line: we definitely
> don't want it for x86_64, and maybe not at all, but we need more
> research to decide the latter.

I think an important question is wether this is for x86_64 in
general, of opteron specific.  It could be that it's not the same
on Intel's EM64Ts.

One reason this might behave differently for opterons is that
it's a cc-NUMA instead of the "normal" SMP.

Something else to consider is the OS you're using.  I've been
told that Linux isn't that good in NUMA and FreeBSD might be
better.


Kurt



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Spinlocks, yet again: analysis and proposed patches
Next
From: Gavin Sherry
Date:
Subject: Re: Spinlocks, yet again: a new test case