Re: Reduce ProcArrayLock contention - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Reduce ProcArrayLock contention
Date
Msg-id 20150804155120.GA32119@awork2.anarazel.de
Whole thread Raw
In response to Re: Reduce ProcArrayLock contention  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On 2015-08-04 11:43:45 -0400, Robert Haas wrote:
> On Tue, Aug 4, 2015 at 11:33 AM, Andres Freund <andres@anarazel.de> wrote:
> > Actually by far not all system calls are full barriers?
> 
> How do we know which ones are and which ones are not?

Good question. Reading the source code of all implementations I suppose
:(

E.g. gettimeofday()/clock_gettime(), getpid() on linux aren't
barriers.

> I can't believe PGSemaphoreUnlock isn't a barrier.  That would be cruel.

Yea, I think that's a pretty safe bet. I mean even if you'd implement it
locklessly in the kernel, that'd still employ significant enough
barriers/atomic ops itself.




pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Reduce ProcArrayLock contention
Next
From: Robert Haas
Date:
Subject: Re: upgrade failure from 9.5 to head