Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: Re: [hwloc-devel] thread safety
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-03-12 11:25:11


On Mar 12, 2010, at 8:16 AM, Samuel Thibault wrote:

> With a full memory barrier, you do not have any issue.

So we're saying that the only way to use hwloc safely with multiple different thread readers and writers is to do a full memory barrier across the entire machine? That seems like a big hammer, and can have performance implications on other parts of the system that you aren't even using.

Is it sufficient, for example, for the app to mark the entire topology struct instance volatile? I.e.:

   volatile hwloc_topology_t topology;

Then every field in there is volatile, right?

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/