Re: Spinlocks and compiler/memory barriers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)2ndquadrant(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Spinlocks and compiler/memory barriers
Date: 2014-06-26 21:13:07
Message-ID: 60825.1403817187@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> I think we should rework things so that we fall back to
> pg_write_barrier(), (*((volatile slock_t *) (lock)) = 0) instead of what
> we have right now.

Surely it had better be a read barrier as well? And S_LOCK the same?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2014-06-26 21:27:23 Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]
Previous Message Andres Freund 2014-06-26 21:01:10 Spinlocks and compiler/memory barriers