[Openmp-commits] [PATCH] D21195: Hwloc refactoring patch

Jonathan Peyton via Openmp-commits openmp-commits at lists.llvm.org
Thu Jun 9 11:51:39 PDT 2016


jlpeyton created this revision.
jlpeyton added reviewers: AndreyChurbanov, tlwilmar.
jlpeyton added a subscriber: openmp-commits.
jlpeyton set the repository for this revision to rL LLVM.

These changes remove the hwloc_topology_ignore_type function which doesn't exist in the hwloc 2.0 API.  In the existing code, the topology extracted from hwloc has the cache levels stripped out and then assumes the final stripped topology follows the typical three-level topology: packages -> cores -> HW threads.  But the code is doing unclean manipulations to determine at what level those resources are located and also assumes too much about what hwloc is detecting (there could be intermediate levels in between socket and core for instance).  This new way of extracting the topology doesn't strip out any hardware objects that hwloc detects.  It does not assume the three level topology, and instead searches for the relevant three levels within the topology for each bit of information using hwloc interface functions. i.e., the three level topology subset that our affinity code is interested in is extracted from the hwloc topology tree directly.  For example, the new `__kmp_hwloc_get_nobjs_under_obj` function gives the user the number of cores under a socket reliably without worrying if there are unexpected objects between the socket object and core object in the hwloc topology structure.  Also, now that all topology information is kept, there is also possibilities of using the caches/numa nodes to determine more sophisticated affinity settings in the future.  There is also some cleanup code added for the destruction of the `__kmp_hwloc_topology` object.

Repository:
  rL LLVM

http://reviews.llvm.org/D21195

Files:
  runtime/src/kmp_affinity.cpp
  runtime/src/kmp_settings.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21195.60216.patch
Type: text/x-patch
Size: 16249 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20160609/2838deb5/attachment.bin>


More information about the Openmp-commits mailing list