Re: [COMMITTERS] pgsql: Do all accesses to shared buffer - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: [COMMITTERS] pgsql: Do all accesses to shared buffer
Date
Msg-id 20051022095030.GA16589@svana.org
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Do all accesses to shared buffer  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Oct 21, 2005 at 06:09:00PM -0400, Tom Lane wrote:
> BTW, we may be perfectly safe on architectures like PPC, where
> S_UNLOCK includes an __asm__ __volatile__ section for a hardware-level
> optimization fence instruction.  I wonder though if it'd be a good idea
> to be marking those fence instructions with the "clobbers memory"
> qualifier to ensure this?

Judging by the comments in the linux kernel w.r.t their barrier()
instruction, there are certain versions of gcc that (incorrectly) do
strange things with the "volatile" tag of asm statements. Cloberring
memory is the way to guarentee what you want...

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

pgsql-hackers by date:

Previous
From: "7r00l (sent by Nabble.com)"
Date:
Subject: nabble.com
Next
From: Paresh Bafna
Date:
Subject: Nested/recursive query execution