Skip to content

support runtime LSE atomics detection for aarch64 #302

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

Closed
wants to merge 1 commit into from

Conversation

tsahee
Copy link

@tsahee tsahee commented Jul 7, 2020

Outline-atomics flag modifies builtin atomics to detect CPU support for
atomic instructions in runtime, thus getting benefits of using LSE
atomics without hurting compatibility.
This flag has no effect if compiling for aarch64 >=v8.1.

Due to the nature of exclusive accesses, which are used when LSE atomics are not available, the effect of LSE atomics is much stronger on large core counts. We've observed as far as 4x transactions per second on sysbench read_only by adding outline-atomics to 64-core aarch64 server (AWS g6.16xlarge).

Outline-atomics flag modifies builtin atomics to detect CPU support for
atomic instructions in runtime, thus getting menefits of using LSE
atomics without hurting compatibility.
This flag has no effect if compiling for aarch64 >=v8.1.
@mysql-oca-bot
Copy link

Hi, thank you for submitting this pull request. In order to consider your code we need you to sign the Oracle Contribution Agreement (OCA). Please review the details and follow the instructions at http://www.oracle.com/technetwork/community/oca-486395.html
Please make sure to include your MySQL bug system user (email) in the returned form.
Thanks

@mswilson
Copy link

mswilson commented Jul 13, 2020

This is a minimal change, I don't think that it is something that could be claimed as copyrightable. It just checks for certain compiler features and sets some flags.

IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64")
  MY_CHECK_CXX_COMPILER_FLAG( "-moutline-atomics" HAVE_OUTLINE_ATOMICS)
  IF(HAVE_OUTLINE_ATOMICS)
     STRING_APPEND(CMAKE_C_FLAGS   " -moutline-atomics")
     STRING_APPEND(CMAKE_CXX_FLAGS " -moutline-atomics")
  ENDIF()
ENDIF()

Would it help to declare this contribution under a BSD license, or to disclaim copyright interest through a public domain declaration?

@mysql-admin
Copy link

Hi @mswilson @tsahee
All code contributions via Github require an OCA in place and confirmation that the code contribution is under OCA regardless of them being large or small

Thanks
==Omer

@tsahee
Copy link
Author

tsahee commented Jul 29, 2020

hello! I signed the OCA a few days ago and e-mailed it. This contribution is under the OCA. Let me know if anything else is needed, thank you!

@mysql-oca-bot
Copy link

Hi, there was no response to our request to sign an OCA or confirm the code is submitted under the terms of the OCA. As such this request will be closed.
Thanks

@jlin
Copy link

jlin commented Oct 23, 2020

Can we get this reopened please as per #302 (comment) ? @mysql-admin

@tsahee
Copy link
Author

tsahee commented Oct 25, 2020

Hi @jlin !
Thank for your interest.
This patch was reposted as #305, tracked here: https://bugs.mysql.com/bug.php?id=100664 and has made it to mysql 8.0.23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants