Re: Reduce ProcArrayLock contention - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Reduce ProcArrayLock contention
Date
Msg-id CA+TgmoaLL7R50Fc-J8Ez301anCyOtLO56GN2cqnoSnZ2wMYAxQ@mail.gmail.com
Whole thread Raw
In response to Re: Reduce ProcArrayLock contention  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On Tue, Aug 4, 2015 at 11:50 AM, Amit Kapila <amit.kapila16@gmail.com> wrote:
> I have kept barriers based on comments on top of atomic read, refer
> below code:
>
>  * No barrier semantics.
>  */
> STATIC_IF_INLINE uint32
> pg_atomic_read_u32(volatile pg_atomic_uint32 *ptr)
>
> Note - The function header comments on pg_atomic_read_u32 and
> corresponding write call seems to be reversed, but that is something
> separate.

That doesn't matter, because the compare-and-exchange *is* a barrier.
Putting a barrier between a store and an operation that is already a
barrier doesn't do anything useful.

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



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Reduce ProcArrayLock contention
Next
From: Robert Haas
Date:
Subject: Re: Tab completion for CREATE SEQUENCE