pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Bruce Momjian <bruce@momjian.us>
To: Sergey E. Koposov <math@sai.msu.ru>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Noah Misch <noah@leadboat.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Subject: Re: Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]
Date: Fri, 16 Mar 2012 11:45:36 +0200
Message-ID: <4F630BC0.3050903@enterprisedb.com> (raw)
In-Reply-To: <4F2FB870.3060104@enterprisedb.com>
References: <4EEB1C77.1000309@enterprisedb.com>
	<20111218224203.GA2950@piware.de>
	<CA+TgmoZzgNrWT3af50YL3_zfSN8AtNXK9sOeACti=5ukwiR0vg@mail.gmail.com>
	<4EEF5397.8090200@enterprisedb.com>
	<20111219200341.GB9495@tornado.leadboat.com>
	<14852.1324325578@sss.pgh.pa.us>
	<4EEFABB2.5050100@enterprisedb.com>
	<20120203014821.GA11939@momjian.us>
	<4F2FB870.3060104@enterprisedb.com>

On 06.02.2012 13:24, Heikki Linnakangas wrote:
> On 03.02.2012 02:48, Bruce Momjian wrote:
>> Sorry for the late reply, but Heikki, can you get this Itanium
>> information into s_lock.h as a comment, particularly the information
>> about the +Ovolatile=__unordered flag?
>
> Good idea. I came up with the attached, hope that explains it.

Committed these additional comments.

> Looking back at the discussions, we concluded that the current code is
> safe on gcc, because it implicitly adds the .rel/.acq opcodes to
> volatile accesses, and HP's compiler does the same as long as you don't
> explicitly disable it with +Ovolatile=__unordered. But what about
> Intel's icc compiler? Presumably it's also safe, but looking at Intel's
> manuals that I found, I'm not completely sure about it. There's an
> option, -m[no-]serialize-volatile, that controls it, but I couldn't
> figure out which is the default. Looking at the docs on that from Intel
> that I found [1], it seems to me that on Linux, the default is *not*
> safe, but on Windows it is.
>
> Sergey, you have dugong in the buildfarm that uses Intel's compiler on
> Itanium. Could you verify whether the -mno-serialize-volatile is the
> default? If you could for example extract the assembler code generated
> by icc for xlog.c, and send it over. Whether it's generating the
> .rel/.acq opcodes should be easy to see in the generated code of the
> XLogGetLastRemoved() function, for example, which doesn't do much else
> than grab a spinlock. On gcc, the -s flag generates the assembly files,
> I presume it's the same on icc.

Sergey confirmed off-list that icc defaults to -mserialize-volatile, so 
we're safe.

-- 
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com



view thread (17+ messages)

Message-ID: <4F630BC0.3050903@enterprisedb.com>
Permalink:  ../4F630BC0.3050903@enterprisedb.com/
Also on:    postgresql.org/message-id/4F630BC0.3050903@enterprisedb.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: heikki.linnakangas@enterprisedb.com, bruce@momjian.us, math@sai.msu.ru, tgl@sss.pgh.pa.us, noah@leadboat.com, robertmhaas@gmail.com
  Subject: Re: [PATCH] Use CC atomic builtins if available [was: Re: TAS patch for building on armel/armhf thumb]
  In-Reply-To: <4F630BC0.3050903@enterprisedb.com>
  References: <4EEB1C77.1000309@enterprisedb.com> <20111218224203.GA2950@piware.de> <CA+TgmoZzgNrWT3af50YL3_zfSN8AtNXK9sOeACti=5ukwiR0vg@mail.gmail.com> <4EEF5397.8090200@enterprisedb.com> <20111219200341.GB9495@tornado.leadboat.com> <14852.1324325578@sss.pgh.pa.us> <4EEFABB2.5050100@enterprisedb.com> <20120203014821.GA11939@momjian.us> <4F2FB870.3060104@enterprisedb.com> <4F630BC0.3050903@enterprisedb.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox