[all-commits] [llvm/llvm-project] 561b6a: [OpenMP][AIX] Implement __kmp_get_load_balance() f...

Xing Xue via All-commits all-commits at lists.llvm.org
Fri May 10 06:23:24 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 561b6ab96e9d5b38a5d2672e6cc6823389b75a3f
      https://github.com/llvm/llvm-project/commit/561b6ab96e9d5b38a5d2672e6cc6823389b75a3f
  Author: Xing Xue <xingxue at outlook.com>
  Date:   2024-05-10 (Fri, 10 May 2024)

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

  Log Message:
  -----------
  [OpenMP][AIX] Implement __kmp_get_load_balance() for AIX (#91520)

AIX has the `/proc` filesystem where `/proc/<pid>/lwp/<tid>/lwpsinfo` has
the thread state in binary, similar to Linux's
`/proc/<pid>/task/<tid>/stat` where the state is in ASCII. However, the
definition of state info `R` in `lwpsinfo` is `runnable`. In Linux,
state `R` means the thread is `running`. Therefore, `lwpsinfo` is not
ideal for our purpose of getting the current load of the system. This
patch uses `perfstat_cpu()` in AIX system library `libperfstat.a` to
obtain the number of threads current running on logical CPUs.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list