Skip to content

v4.1.x: Powerpc atomics: Force usage of powerpc assembly. #8708

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions config/opal_config_asm.m4
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,18 @@ AC_DEFUN([OPAL_CONFIG_ASM],[
AC_MSG_ERROR([Could not determine PowerPC word size: $ac_cv_sizeof_long])
fi
OPAL_GCC_INLINE_ASSIGN='"1: li %0,0" : "=&r"(ret)'

# See the following github PR and some performance numbers/discussion:
# https://github.com/open-mpi/ompi/pull/8649
AC_MSG_CHECKING([$opal_cv_asm_arch: Checking if force gcc atomics requested])
if test $force_gcc_atomics_ppc = 0 ; then
AC_MSG_RESULT([no])
opal_cv_asm_builtin="BUILTIN_NO"
else
AC_MSG_RESULT([Yes])
AC_MSG_WARN([$opal_cv_asm_arch: gcc atomics have been known to perform poorly on powerpc.])
fi

;;
# There is no current difference between s390 and s390x
# But use two different defines in case some come later
Expand Down
7 changes: 7 additions & 0 deletions config/opal_configure_options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ else
WANT_BRANCH_PROBABILITIES=0
fi

AC_ARG_ENABLE([builtin-atomics-for-ppc],[AS_HELP_STRING([--enable-builtin-atomics-for-ppc],
[POWER architectures only: Force use of builtin atomics if available. This could either be gcc builtins or C11 atomics, depending on what is available on your system. Enabling this is known to cause poor performance in atomic operations on Power machines. (default: disabled)])])
if test "x$enable_builtin_atomics_for_ppc" = "xyes" ; then
force_gcc_atomics_ppc=1
else
force_gcc_atomics_ppc=0
fi

#
# Memory debugging
Expand Down