- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it guaranteed on ia64 architecture in multi-processor environment that a plain load operation would fetch a 64-bit value atomically? In other words, is it possible that if CPU1 stores some value to a 64-bit memory location and CPU2 fetches the value from the same memory location at the same time, the fetched value would be neither one before nor after store operation?
Thx, ---Greg
Thx, ---Greg
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
64-bit int load on 64-bit architectures is definitely an atomic operation, unlike 32-bit x86, where it is done by a pair of 32-bit loads.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - ggalperin
Is it guaranteed on ia64 architecture in multi-processor environment that a plain load operation would fetch a 64-bit value atomically? In other words, is it possible that if CPU1 stores some value to a 64-bit memory location and CPU2 fetches the value from the same memory location at the same time, the fetched value would be neither one before nor after store operation?
Thx, ---Greg
Thx, ---Greg
8-, 16-, 32-, 64-, 128-bit aligned loads and stores are indeed atomic on IA-64.
However to get them you probably have to use something like SSE intrinsics or assembly.
For details see:
Intel Itanium Architecture Software Developer's Manual - Volume 2: System Architecture, Revision 2.2
http://www.intel.com/design/itanium/manuals/245318.htm
(4.5 Memory Datum Alignment and Atomicity)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Dmitriy Vyukov
8-, 16-, 32-, 64-, 128-bit aligned loads and stores are indeed atomic on IA-64.
However to get them you probably have to use something like SSE intrinsics or assembly.
For details see:
Intel Itanium Architecture Software Developer's Manual - Volume 2: System Architecture, Revision 2.2
http://www.intel.com/design/itanium/manuals/245318.htm
(4.5 Memory Datum Alignment and Atomicity)
Hmmm... Do you sure that you mean exactly IA-64 (i.e. Itanium)? Probably you mean Intel 64 (i.e. x86-64)...
However, 8-, 16-, 32-, 64-, 128-bit aligned loads and stores are also atomic on IA-32 (i.e. x86) and on Intel 64 (i.e. x86-64). But don't try to extend this to the C language, for example. In order to get 128-bit atomic load/store you have to emit some particular machine instruction, not just plain access to 128-bit variable in the C source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Dmitriy Vyukov
Hmmm... Do you sure that you mean exactly IA-64 (i.e. Itanium)? Probably you mean Intel 64 (i.e. x86-64)...
However, 8-, 16-, 32-, 64-, 128-bit aligned loads and stores are also atomic on IA-32 (i.e. x86) and on Intel 64 (i.e. x86-64). But don't try to extend this to the C language, for example. In order to get 128-bit atomic load/store you have to emit some particular machine instruction, not just plain access to 128-bit variable in the C source.
Just want to clarify: even if a 64-bit word is only 8-bit aligned, I can still emit a certain atomic load/store instruction on Itanium that will be atomic? Thx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - ggalperin
even if a 64-bit word is only 8-bit aligned, I can still emit a certain atomic load/store instruction on Itanium that will be atomic?
For load-update-store, you have several options, including OpenMP atomic.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page