[Openmp-commits] TLS for POWER
hfinkel at anl.gov
Thu Jun 18 09:49:01 PDT 2015
First, thanks for working on this! I think that we should definitely enable this mode of supporting thread locals if possible.
As an organizational note, I think it would be better to add a new feature macro for using TLS in this way (currently enabled only for PPC64). As you point out, other architectures will likely also want to do this, and we should make this straightforward.
This function could be static, right?
+ list. This is because each thread maintain a private variable
maintain -> maintains
I don't like that the comment explaining what this does is embedded in some other function (above). Please at least comment on where the comment is explaining what this does.
+ // one or more register occured since the last parallel loop
register -> registrations
----- Original Message -----
> From: "Alexandre Eichenberger" <alexe at us.ibm.com>
> To: openmp-commits at dcs-maillist2.engr.illinois.edu
> Sent: Friday, June 12, 2015 5:51:27 PM
> Subject: [Openmp-commits] TLS for POWER
> I would like to request switching the threadprivate scheme to TLS
> Level Storage) for POWER before we get legacy code out there.
> measurements has shown TLS to have about 10x lower overhead (number
> change depending to the TLS scheme). TLS is also used by other
> (e.g. XL) and thus provide better interoperability.
> Approach is relatively simple: compiler still generate a call to
> the constructors and the destructors, but the functions calling the
> constructor/destructors have been changed a bit so that the compiler
> the constructor on the TLS version of the object (not the global one,
> as it
> currently is in KMP). Then, prior to starting a parallel function,
> workers check if there are no new constructors/destructors that have
> registered; if there are, they will call the constructors prior to
> the parallel region. Destructors are called when killing a worker
> KMP code change have been done (exclusively under #def for power
> architecture), LLVM changes have been done, code has been tested.
> will need to be coordinated with the LLVM changes, which must go at
> same time.
> If there is interest, and no code legacy issue, this patch could also
> applied for other architectures that have TLS support.
> (See attached file: tls_patch)
> Openmp-commits mailing list
> Openmp-commits at dcs-maillist2.engr.illinois.edu
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
More information about the Openmp-commits