Re: Inefficient barriers on solaris with sun cc - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Inefficient barriers on solaris with sun cc
Date
Msg-id CA+TgmobKFAJdXm3=kAU+z0FaheadiWgCutNxCizCd9kAyJLfGQ@mail.gmail.com
Whole thread Raw
In response to Re: Inefficient barriers on solaris with sun cc  (Oskari Saarenmaa <os@ohmu.fi>)
Responses Re: Inefficient barriers on solaris with sun cc  (Oskari Saarenmaa <os@ohmu.fi>)
Re: Inefficient barriers on solaris with sun cc  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
On Fri, Sep 26, 2014 at 8:36 AM, Oskari Saarenmaa <os@ohmu.fi> wrote:
> 25.09.2014, 16:34, Andres Freund kirjoitti:
>> Binaries compiled on solaris using sun studio cc currently don't have
>> compiler and memory barriers implemented. That means we fall back to
>> relatively slow generic implementations for those. Especially compiler,
>> read, write barriers will be much slower than necessary (since they all
>> just need to prevent compiler reordering as both sparc and x86 are run
>> in TSO mode under solaris).
>
> Attached patch implements compiler and memory barriers for Solaris Studio
> based on documentation at
> http://docs.oracle.com/cd/E18659_01/html/821-1383/gjzmf.html
>
> I defined read and write barriers as acquire and release barriers instead of
> pure read and write ones as that's what other platforms appear to do.

So you think a read barrier is the same thing as an acquire barrier
and a write barrier is the same as a release barrier?  That would be
surprising.  It's certainly not true in general.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Oskari Saarenmaa
Date:
Subject: Re: Inefficient barriers on solaris with sun cc
Next
From: Andres Freund
Date:
Subject: Re: INSERT ... ON CONFLICT {UPDATE | IGNORE}