[parisc-linux] Re: [parisc-linux-cvs] linux-2.6 jejb
Grant Grundler
grundler at parisc-linux.org
Fri Aug 20 09:25:43 MDT 2004
On Fri, Aug 20, 2004 at 10:02:49AM -0400, John David Anglin wrote:
> I'm far from an expert on this but I believe that gcc C will reorder
> memory accesses for better scheduling if it can prove that the accesses
> don't alias each other.
I'm trying hard to avoid confusion over "memory ordering" (a HW feature
of alpha, ia64) and "instruction re-ordering" done by the tool chain.
"reordering memory accesses" != "weak memory ordering".
> Thus, asm's have to be explicit regarding
> the memory that they affect, and memory barriers may be needed around
> critical regions.
Agreed. I will assert memory barriers are not required (parisc HW is
strongly ordered) and we have to tell gcc/binutils it can't re-order
memory accesses across critical region boundaries (ie lock/unlock).
I don't know how to implement the latter and if adding "memory" to the
ldcw/stw (lock/unlock) asm instructions is sufficient, then let's do that.
> 3.3 and later are more aggressive than earlier
> versions in this regard.
yeah - I guess I didn't understand this from the original posting in January.
thanks,
grant
More information about the parisc-linux-cvs
mailing list