Re: Latches with weak memory ordering (Re: max_wal_senders must die) - Mailing list pgsql-hackers

From Florian Weimer
Subject Re: Latches with weak memory ordering (Re: max_wal_senders must die)
Date
Msg-id 8239qx5j86.fsf@mid.bfk.de
Whole thread Raw
In response to Re: Latches with weak memory ordering (Re: max_wal_senders must die)  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
* Andres Freund:

> I was never talking about 'locking the whole cache' - I was talking about
> flushing/fencing it like a "global" read/write barrier would. And "lock
> xchgb/xaddl" does not imply anything for other cachelines but its own.

My understanding is that once you've seen the result of an atomic
operation on i386 and amd64, you are guaranteed to observe all prior
writes performed by the thread which did the atomic operation, too.
Explicit fencing is only necessary if you need synchronization without
atomic operations.

--
Florian Weimer                <fweimer@bfk.de>
BFK edv-consulting GmbH       http://www.bfk.de/
Kriegsstraße 100              tel: +49-721-96201-1
D-76133 Karlsruhe             fax: +49-721-96201-99


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Latches with weak memory ordering (Re: max_wal_senders must die)
Next
From: "Ross J. Reedstrom"
Date:
Subject: Re: contrib: auth_delay module