From: Leigh Johnston on
>>
>> What about store forwarding?
>
> I must admit you are digging deeper than my understanding extends.
> Hopefully, someone more knowledgeable will chime in.
> --

Read
http://bartoszmilewski.wordpress.com/2008/11/05/who-ordered-memory-fences-on-an-x86/



From: Leigh Johnston on
I guess the use-cases for MFENCE on x86 are rare so Microsoft decided that
its overhead cannot be justified to have volatile use it.

/Leigh

From: Leigh Johnston on
Or the LOCK prefix rather which is used by Enter/LeaveCriticalSection.

/Leigh

From: Bo Persson on
Leigh Johnston wrote:
> I guess the use-cases for MFENCE on x86 are rare so Microsoft
> decided that its overhead cannot be justified to have volatile use
> it.
> /Leigh

Because volatile has nothing to do with threads, just with memory
mapped hardware?



Bo Persson


From: Igor Tandetnik on
Bo Persson <bop(a)gmb.dk> wrote:
> Leigh Johnston wrote:
>> I guess the use-cases for MFENCE on x86 are rare so Microsoft
>> decided that its overhead cannot be justified to have volatile use
>> it.
>> /Leigh
>
> Because volatile has nothing to do with threads, just with memory
> mapped hardware?

That would be the case for most C++ compilers, yes. But MS made volatile have something to do with threads as of VC8 (VS 2005), by claiming that reading and writing volatile variables now has acquire/release semantics a la Java, and that the compiler would emit barrier instructions as necessary.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead. -- RFC 1925