From: Leigh Johnston on 8 Jan 2010 09:44 >> >> 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 8 Jan 2010 09:58 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 8 Jan 2010 10:28 Or the LOCK prefix rather which is used by Enter/LeaveCriticalSection. /Leigh
From: Bo Persson on 8 Jan 2010 17:42 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 8 Jan 2010 17:49 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
First
|
Prev
|
Pages: 1 2 3 Prev: deleting pointers in a list. Next: Using std::less_equl predicate with std::min() |