- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are old AMD CPUs without mfence supported by TBB 4.0? I gather they weren't with v2.2. According to the forum, there is a workaround that involves recompiling using a different instruction. I am hoping that by now the workaround as been incorporated into the main product. All the discussion I've found about this was a couple of years old. The documentation does not have anything relevant under "known issues", nor can I see
If not, does anyone know if Microsoft's PPL has the same limitation?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[SergeyK] It looks like no. Take a look at:
windows_ia32.h
...
#define __TBB_full_memory_fence() __asm { __asm mfence }
...
As you can see there are no any CPU-related macros around __TBB_full_memory_fence for 32-bit Windowsplatforms.
Take a look atwindows_intel64.h. In thatcasefor64-bit Windows platforms__TBB_full_memory_fence depends on
a C++ compiler, that is, Intel or Microsoft.
Best regards,
Sergey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As a workaround, reimplement __TBB_full_memory_fence in include/tbb/machine/windows_ia??.h to, e.g., do a compare-and-swap on a global dummy variable (no loop, just a single call), or anything your compiler provides that will do the trick (built-in, new C++ standard, ...).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It gets confusing... Take a look at adiscussion:
https://blogs.oracle.com/dave/entry/instruction_selection_for_volatile_fences
...There are still platforms where MFENCE is clear winner (older AMD processors, for instance)...
I think a question to AMD could clear it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Feel free to amend my suggestion to use a local variable instead (and/or a different RMW instruction).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Intel Pentium 4 processor family and higher
- Non Intel processors compatible with the above processors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It gets confusing... Take a look at adiscussion:
https://blogs.oracle.com/dave/entry/instruction_selection_for_volatile_fences
...There are still platforms where MFENCE is clear winner (older AMD processors, for instance)...
I think a question to AMD could clear it.
I've contacted AMD and this is their response:
...
We at Global Customer Care would not be suited to answer these questions. I suggest that you visit our developer
forums and register there and post these questions you have. The correct people within the forums will give you
the best proper answer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply. Although it's not what I wanted to hear, as my employer does need to support customers with old hardware.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the reply. Although it's not what I wanted to hear, as my employer does need to support customers with old hardware.
Could you follow a link:
http://developer.amd.com/pages/default.aspx
fromaPost #10? Your problem is related to AMD CPUs andI thinkAMD engineers could answerall your questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another alternative, specific to Windows, seems to be MemoryBarrier(). (Hopefully "It may also prevent the compiler from re-ordering read and write operations.", my emphasis, is just bad technical writing.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page