[cpp-threads] Alternatives to SC

Chris Thomasson cristom at comcast.net
Wed Jan 17 20:57:29 GMT 2007


> On Tue, Jan 16, 2007 at 05:05:16PM -0800, Chris Thomasson wrote:
>> From: "Paul E. McKenney" <paulmck at linux.vnet.ibm.com>
>> To: "C++ threads standardisation" <cpp-threads at decadentplace.org.uk>
>> Sent: Tuesday, January 16, 2007 9:46 AM
>> Subject: Re: [cpp-threads] Alternatives to SC
>
> Hello, Chris,
>
>> [...]
[...]
>>
>> Here is a trick you can do on the x86:
[...]

> The above is indeed true on a number of x86 implementations, but is
> -not- reflected in the architecture.  See for example the AMD x86-64
> Architecture Programmer's Manual Volume 2 (System Programming),
> 24593-Rev.3.07-Sep-2002, page 195, first bullet:
>
> Out-of-order reads are allowed.  Out-of-order reads can occur
> as a result of out-of-order execution or speculative execution.
> The processor can read memory out-of-order to allow out-of-order
> execution to proceed.
>
> There are also a number of Intel manuals containing the words
> "Reads can be carried out speculatively and in any order".
>
> So there is no guarantee of #LoadLoad across all x86 implementations,
> even if a number of very popular x86 implementations do in fact provide
> this guarantee.

Well, does that mean that RCU should have lfence on x86? That would tank its 
performance, unless you used that "batching" algorithm I mentioned in a 
previous post to this group. I hate it when the architecture manual does not 
"explicitly and clearly " detail its memory model... SPARC documents are 
really good in this respect, Intel is really, well, not so good here...

;^)





More information about the cpp-threads mailing list