Adding 'sb' instruction to spin_delay() for ARM v8.5 onward#611
Adding 'sb' instruction to spin_delay() for ARM v8.5 onward#611salvatoredipietro wants to merge 1 commit intomysql:trunkfrom
Conversation
|
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 https://oca.opensource.oracle.com/ |
|
Submitted OCA request |
|
Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment: |
|
I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it. |
|
Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow |
We would like to propose this optimization for ARM architecture that, at runtime, it switches to SB instruction if supported by the system. SB (Speculation Barrier) is a modern barrier, available from armv8.5a. It achieves the same result as issuing ISB, but without having the CPU to drop its instruction pipeline.
Our performance evaluation based on 50 repetitions of the attached benchmark (inspired from https://bugs.mysql.com/bug.php?id=74832) conducted on Ubuntu 24.04 on m8g.24xlarge AWS instance using trunk MySQL branch, shows on average up to 28% reduction of the script execution time when
sbinstruction is used. Also linux perf shows ~11% drop of ut_delay function usage. Here the data:sql.txt
psdoit.txt