Re: pgsql: Fix a few problems in barrier.h. - Mailing list pgsql-committers

From Tom Lane
Subject Re: pgsql: Fix a few problems in barrier.h.
Date
Msg-id 27977.1374118250@sss.pgh.pa.us
Whole thread Raw
In response to Re: pgsql: Fix a few problems in barrier.h.  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-committers
Robert Haas <robertmhaas@gmail.com> writes:
> According to http://en.wikipedia.org/wiki/Memory_ordering, PA-RISC has
> weak memory ordering.

BTW, so far as I can see, their reference for that claim is the two
articles by Paul McKenney; but what McKenney actually says is

    Although the PA-RISC architecture permits full reordering of
    loads and stores, actual CPUs run fully ordered. This means the
    Linux kernel's memory-ordering primitives generate no code; they
    do, however, use the GCC memory attribute to disable compiler
    optimizations that would reorder code across the memory barrier.

So the committed patch duplicates what the kernel does (unless someone
cares to dig into the kernel and show otherwise).

            regards, tom lane


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Fix a few problems in barrier.h.
Next
From: Tom Lane
Date:
Subject: pgsql: Fix direct access to Relation->rd_indpred.