From: Richard Henderson <r...@redhat.com>
Date: Wed, 30 Nov 2011 08:39:44 -0800

> I've committed this sequence to mainline after re-testing on
> sparc64-linux.

I've got a regstrap running on Niagara-3, sorry for taking so long :-/

> As a follow-up, I have a patch to change the default memory model to
> TSO for all versions of both Linux and Solaris.  This leaves the
> memory model set to the most relaxed for the cpu when targeting
> other OSs, and I suppose in particular RTEMS.
> 
> I guess my only question is: has TSO always been the default for
> Solaris?  I seem to recall Dave saying that Linux used to be RMO,
> but so long ago that surely no one is using new software on it...

Linux originally did RMO but I killed that several years ago, no
new chips are implementing RMO and this means all the necessary
membar instructions are nothing but pure overhead.

Solaris always ran userspace in TSO as far as I remember.

Your change will leave FreeBSD and NetBSD with the RMO setting, and
both of them run userland in TSO as well.

BTW, Linux has a "memory_ordering" system call where you can change
the PSTATE_MM setting to whatever memory model you like.  I suppose
Solaris has something similar.

So one thing to consider doing is, if there is some doubt, to set
it explicitly to TSO in some crt code.

Reply via email to