[all-commits] [llvm/llvm-project] 92baf4: [OpenMP] Fix affinity determine capable algorithm ...

Jonathan Peyton via All-commits all-commits at lists.llvm.org
Tue Jun 15 14:24:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 92baf414dbfb31d7d69bea56a0ce982d2b737268
      https://github.com/llvm/llvm-project/commit/92baf414dbfb31d7d69bea56a0ce982d2b737268
  Author: Peyton, Jonathan L <jonathan.l.peyton at intel.com>
  Date:   2021-06-15 (Tue, 15 Jun 2021)

  Changed paths:
    M openmp/runtime/src/z_Linux_util.cpp

  Log Message:
  -----------
  [OpenMP] Fix affinity determine capable algorithm on Linux

Remove strange checks for syscall() arguments where mask is NULL.
Valgrind reports these as error usages for the syscall.
Instead, just check if CACHE_LINE bytes is long enough. If not, then
search for the size. Also, by limiting the first size detection
attempt to CACHE_LINE bytes, instead of 1MB, we don't use more than one
cache line for the mask size. Before this patch, sometimes the returned
mask size was 640 bytes (10 cache lines) because the initial call to
getaffinity() was limited only by the internal kernel mask size
which can be very large.

Differential Revision: https://reviews.llvm.org/D103637




More information about the All-commits mailing list