[Openmp-commits] Switch to TLS for POWER

Alexandre Eichenberger alexe at us.ibm.com
Mon Jul 6 07:50:00 PDT 2015


Hal,

Yes, they need to go in sync

Alexandre




From:	Hal Finkel <hfinkel at anl.gov>
To:	Alexandre Eichenberger/Watson/IBM at IBMUS
Cc:	<openmp-commits at dcs-maillist2.engr.illinois.edu>
Date:	07/02/2015 06:53 PM
Subject:	Re: [Openmp-commits] Switch to TLS for POWER



Alexandre,

This needs to be committed at the same time as the Clang patch to keep
everything working, correct?

 -Hal

----- Original Message -----
> From: "Alexandre Eichenberger" <alexe at us.ibm.com>
> To: openmp-commits at dcs-maillist2.engr.illinois.edu
> Sent: Thursday, June 4, 2015 7:40:46 AM
> Subject: [Openmp-commits] Switch to TLS for POWER
>
>
> I would like to request switching the threadprivate scheme to TLS
> (Thread
> Level Storage) for POWER before we get legacy code out there.
> Individual
> measurements has shown TLS to have about 10x lower overhead (number
> may
> change depending to the TLS scheme). TLS is also used by other
> compilers
> (e.g. XL) and thus provide better interoperability.
>
> Approach is relatively simple: compiler still generate a call to
> register
> the constructors and the destructors, but the functions calling the
> constructor/destructors have been changed a bit so that the compiler
> call
> 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,
> the
> workers check if there are no new constructors/destructors that have
> been
> registered; if there are, they will call the constructors prior to
> starting
> the parallel region. Destructors are called when killing a worker
> thread.
>
> KMP code change have been done (exclusively under #def for power
> architecture), LLVM changes have been done, code has been tested.
> Commit
> will need to be coordinated with the LLVM changes, which must go at
> the
> same time.
>
> If there is interest, and no code legacy issue, this patch could also
> be
> applied for other architectures that have TLS support.
>
> Alexandre
>
> (See attached file: june3-threadprivate-patch)
> _______________________________________________
> Openmp-commits mailing list
> Openmp-commits at dcs-maillist2.engr.illinois.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/openmp-commits
>

--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory







More information about the Openmp-commits mailing list