Re: Move PinBuffer and UnpinBuffer to atomics - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Move PinBuffer and UnpinBuffer to atomics
Date
Msg-id 18006.1459274982@sss.pgh.pa.us
Whole thread Raw
In response to Re: Move PinBuffer and UnpinBuffer to atomics  (Andres Freund <andres@anarazel.de>)
Responses Re: Move PinBuffer and UnpinBuffer to atomics
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2016-03-29 13:24:40 -0400, Tom Lane wrote:
>> AFAICS, lwarx/stwcx are specifically *word* wide.

> There's actually lbarx/stbcx - but it's not present in all ISAs. So I
> guess it's clear where to go.

Hm.  We could certainly add a configure test to see if the local assembler
knows these instructions --- but it's not clear that we should depend on
compile-time environment to match run-time.

Googling suggests that these instructions came in with PPC ISA 2.06
which seems to date to 2010.  So there's undoubtedly still production
hardware without them.

In the department of not-production hardware, I checked this on prairiedog
and got
/var/tmp/ccbQy9uG.s:1722:Invalid mnemonic 'lbarx'
/var/tmp/ccbQy9uG.s:1726:Invalid mnemonic 'stbcx.'
        regards, tom lane



pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Updated backup APIs for non-exclusive backups
Next
From: Andres Freund
Date:
Subject: Re: Move PinBuffer and UnpinBuffer to atomics