[all-commits] [llvm/llvm-project] d4a7b8: [OpenMP][libomp] avoid spin wait and yield on arm6...

Jonathan Peyton via All-commits all-commits at lists.llvm.org
Fri Jun 24 10:02:33 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4a7b8de527da9f3fa02a86c131b41ca52bb878c
  Author: Daniel Douglas <daniel_douglas+llvm at apple.com>
  Date:   2022-06-24 (Fri, 24 Jun 2022)

  Changed paths:
    M openmp/runtime/src/kmp.h
    M openmp/runtime/src/kmp_global.cpp
    M openmp/runtime/src/kmp_runtime.cpp

  Log Message:
  [OpenMP][libomp] avoid spin wait and yield on arm64 macOS

This patch changes the default behavior to avoid spin waiting and
yielding. (See “Don’t Keep Threads Active And Idle” section here:

We verified using instruments traces that the changes improve scheduling
behavior on macOS.

We also collected results using EPCC schedbench
(https://github.com/LangdalP/EPCC-OpenMP-micro-benchmarks) that are
attached here that show a reduction in standard deviation and max test
run time across all scheduling types. Static scheduling sees dramatic
improvements with these changes, we see a 2-4x average runtime
improvement in the benchmark.

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

More information about the All-commits mailing list