[Openmp-commits] [PATCH] D101882: [OpenMP] Fix hidden helper + affinity assignment

Joachim Protze via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue May 11 00:52:16 PDT 2021


protze.joachim added a comment.

In D101882#2745448 <https://reviews.llvm.org/D101882#2745448>, @jlpeyton wrote:

>> Do we set any affinity for the hidden helper threads, or are they free floating?
>
> The hidden helpers do get their affinity set as if they were normal worker threads.
>
> e.g., with this patch and if KMP_AFFINITY=compact (and two hardware threads per core), then
> regular gtid 0 is pinned to the first core
> regular gtid 9 is pinned to the first core
> regular gtid 10 is pinned to the second core
> regular gtid 11 is pinned to the second core
> regular gtid 12 is pinned to the third core
> ...
> hidden helper gitd 1 is pinned to the first core
> hidden helper gtid 2 is pinned to the second core
> hidden helper gtid 3 is pinned to the second core
> hidden helper gtid 4 is pinned to the third core
> ...
> hidden helper gtid 8 is pinned to the fifth core
>
> Is there a consensus on if we want them free-floating or not? I assume we do, but want to make sure.

I don't think, that such binding of the hidden threads is optimal. On our dual-socket system with sub-numa clustering this would bind all helper threads to the same sub-numa domain.
I'd suggest a second env var to control the binding of the helper threads (with some reasonable default).

This is nothing to block this patch, but can be implemented in a followup patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101882/new/

https://reviews.llvm.org/D101882



More information about the Openmp-commits mailing list