Re: Reduce ProcArrayLock contention - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Reduce ProcArrayLock contention
Date
Msg-id 20150804155432.GB32119@awork2.anarazel.de
Whole thread Raw
In response to Re: Reduce ProcArrayLock contention  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-hackers
On 2015-08-04 21:20:20 +0530, Amit Kapila 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.

Well, the question is whether you *need* barrier semantics in that
place. If you just have a retry loop around a compare/exchange there's
no point in having one, it'll just cause needless slowdown due to
another bus-lock.



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Incorrect comment about abbreviated keys
Next
From: Robert Haas
Date:
Subject: Re: Reduce ProcArrayLock contention