- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
If yes, then I guess you need an MFENCE as a memory barrier to a store.release operation unless your prior accesses were just stores.
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
http://www.intel.com/design/itanium/downloads/25142901.pdf if they have not already. (Though by the terminology they are using, they may have already read it.)Id recommend that they read
I believe that the answer to the question is that loads can pass subsequent plain stores to a different location. But a load may not pass a subsequent store.release. So just a store.release should be necessary, not a full MFENCE, though from the question it is not clear what the questioner is trying to do exactly.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
though from the question it is not clear what the questioner is trying to do exactly.
I believe he is trying to figure how many MFENCE instructions are needed for an IA-32/64 implementation of SMR.
My implementation uses an MFENCE to prevent IA-32 from reordering the load, after store to another location case. I think we may need an extra MFENCE when you store into a hazard pointer that was null. Joe pointed this out on comp.programming.threads.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
This is just not correct. LFENCE and SFENCE are really not necessary. But MFENCE is necessary in some situations, even if SSE is not used.
The main (the only?) source of reorderings in x86 is store buffer. In order to "neutralize" store buffer one have to use MFENCE.
One of the most famous examples where MFENCE is needed on x86 is Peterson's mutual exclusion algorithm:
http://en.wikipedia.org/wiki/Peterson%27s_algorithm
One can see details of x86 ordering rules in "Intel 64 Architecture Memory Ordering White Paper":
http://developer.intel.com/products/processor/manuals/318147.pdf

- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora