From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Reduce ProcArrayLock contention |
Date: | 2015-08-04 16:11:02 |
Message-ID: | CA+TgmoaLL7R50Fc-J8Ez301anCyOtLO56GN2cqnoSnZ2wMYAxQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Aug 4, 2015 at 11:50 AM, Amit Kapila <amit(dot)kapila16(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2015-08-04 16:30:08 | Re: Tab completion for CREATE SEQUENCE |
Previous Message | Andres Freund | 2015-08-04 15:54:32 | Re: Reduce ProcArrayLock contention |