[cpp-threads] Random updates

Boehm, Hans hans.boehm at hp.com
Fri Mar 25 22:57:06 GMT 2005


[Testing the mailing list and providing some random updates.]

I ended up giving an HP webcast on multithreaded programming
issues on Itanium.  (It's preserved at
http://www.presentationselect.com/hp/archives.asp if someone
really wants to watch it.  You can skip the marketing stuff
at the end.  They do insist on contact info.)

One of the insights from the preparation for that talk was that
the story about volatiles on Itanium isn't really as consistent as
I had thought and hoped.  As with almost everything in this area,
the spec
(ftp://download.intel.com/design/Itanium/Downloads/24535803.pdf)
turns out to be less clear than everyone had thought.

Only the HP/UX compiler fully implements
acquire/release semantics for volatiles.  Gcc generates the right
instructions, but does at least common subexpression elimination across
acquire loads.  The Intel compiler behaves similarly, but also has
a flag to turn the generation of ld.acq and st.rel off altogether.
If you know all of this, you can work around it, since compiler-only
barriers are relatively easy to implement for both gcc and icc.
But standardization would be clearly be better.
(I had a lot of help from Intel in uncovering all of this.  I think
there
are some useful discussion underway to try to simplify matters.  I
did not investigate any Windows or VMS compilers.)

The HP compiler supports various HP-specific attributes to
optionally give volatiles weaker semantics (see
http://www.interex.org/pubcontent/enterprise/jan01/08thom.html,
about 2/3 of the way down, under "Memory Ordering Considerations").

I finally released a new version of the atomic_ops package
http://www.hpl.hp.com/research/linux/atomic_ops/, which should
support most of the common architectures.  Hopefully this
will allow us to prototype library facilities in a portable
way.  (Probably the most serious
omission for this group is SPARC V9. V8 is mostly there, but not
all that interesting.  Maged helped with PowerPC, though I'm not
sure I got it completely right.  Bug reports/fixes/ports are
greatly appreciated.)

I am planning on going to Lillehammer, and requested a time slot
to talk about our work there.

Hans





More information about the cpp-threads mailing list