Re: Re: [PERFORM] Disable-spinlocks while compiling postgres 9.1 for ARM Cortex A8 - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Re: [PERFORM] Disable-spinlocks while compiling postgres 9.1 for ARM Cortex A8
Date
Msg-id CAHyXU0xZpzUJjTzBUOUbJHgMboH6GR50kmtEYzZopXUb1C88uQ@mail.gmail.com
Whole thread Raw
In response to Re: Re: [PERFORM] Disable-spinlocks while compiling postgres 9.1 for ARM Cortex A8  (Jayashankar K B <Jayashankar.KB@lnties.com>)
List pgsql-general
On Sun, Feb 26, 2012 at 6:16 AM, Jayashankar K B
<Jayashankar.KB@lnties.com> wrote:
> Ok. I did a manual patch and it Postgres 9.1.1 compiled for me without using the --disable-spinlocks option.
> Thanks a lot for the patch. :)
> By the way, could you please point me to the explanation on the significance of spinlocks for Postgres?

spinlocks are used all over the place to synchronize access to shared
data structures (see here: http://en.wikipedia.org/wiki/Spinlock also
see here: http://rhaas.blogspot.com/2011/01/locking-in-postgresql.html).
 you can awkwardly implement them in high level languages like C but
typically there are hardware primitives that are much faster and
better to use.

very generally speaking, spinlocks are a better than semaphores when
the lock duration is very short, contention isn't terrible, and the
time taken to acquire the lock matters.

merlin

pgsql-general by date:

Previous
From: hamann.w@t-online.de
Date:
Subject: problem setting up
Next
From: Adrian Klaver
Date:
Subject: Re: problem setting up