Re: Spinlocks and CPU Architectures - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: Spinlocks and CPU Architectures
Date
Msg-id 20051011153642.GF22806@svana.org
Whole thread Raw
In response to Re: Spinlocks and CPU Architectures  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Oct 11, 2005 at 11:12:46AM -0400, Tom Lane wrote:
> This seems pretty unworkable from a packaging standpoint.  Even if you
> teach autoconf how to tell which model it's running on, there's no
> guarantee that the resulting executables will be used on that same
> machine.  We would have to make a run-time test, and I do not think that
> that idea is attractive either --- adding a conditional branch to the
> spinlock code will likely negate whatever performance improvement we
> could hope to get.

Well, as long as the code you've got works on all the systems you
expect, you have the choice. If you start getting to the point where
there is no single piece of code that works across all the expected
systems, then you have an issue.

I don't think we're there yet, but I don't think using a function
pointer would be all that expensive?

Performence measuring I guess...
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Spinlocks and CPU Architectures
Next
From: Peter Eisentraut
Date:
Subject: Re: Spinlocks and CPU Architectures