Memory ordering

Just had a couple of white papers published on memory ordering. This is a topic which is quite hard to find documentation on, and also quite complex. Fortunately, it's also rarely encountered.

In Oracle Solaris Studio 12.2 we introduced the file mbarrier.h. This defines some intrinsics which allow the developer to enforce memory ordering.

The first paper covers avoiding the reordering of memory operations that the compiler may perform when compiling an application. The second paper covers the more complex issue of avoiding the reordering of memory operations that the processor may do at runtime.

Comments:

Darryl,

What methodology is used to create all these advanced transformations? Meta language invariants theory? Trial and error?

Regards,
Marek

Posted by Marek Wojcik on October 20, 2010 at 02:48 AM PDT #

I'm not quite sure what you mean. So I hope I'm answering the correct question.

The intrinsics are just asm statements. The transformations that the compiler performs are standard optimisations, the reordering that the processors perform is implementation dependent, but cannot violate the semantics of the machine.

HTH,

Darryl.

Posted by Darryl Gove on October 20, 2010 at 05:25 AM PDT #

Post a Comment:
Comments are closed for this entry.
About

Darryl Gove is a senior engineer in the Solaris Studio team, working on optimising applications and benchmarks for current and future processors. He is also the author of the books:
Multicore Application Programming
Solaris Application Programming
The Developer's Edge

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
5
6
8
9
10
12
13
14
15
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today
Bookmarks
The Developer's Edge
Solaris Application Programming
Publications
Webcasts
Presentations
OpenSPARC Book
Multicore Application Programming
Docs