server icon indicating copy to clipboard operation
server copied to clipboard

MDEV-19929 Add a startup message about PAUSE instruction timing

Open dr-m opened this issue 1 year ago • 1 comments
trafficstars

  • [x] The Jira issue number for this PR is: MDEV-19929

Description

On IA-32 and AMD64 (x86-64) CPU implementations, the latency of the PAUSE instruction (REPZ NOP that was repurposed from a no-operation on the Intel Pentium 4) can vary a lot, and we may adjust the my_cpu_relax_multiplier accordingly. Let us display the value of that variable on startup if --log-warnings=3 or larger was specified.

Release Notes

On x86, if mariadbd is started up with --log-warnings=3 or larger, a message like this will appear in the server error log:

[Note] Using PAUSE multiplier 200

How can this PR be tested?

On an IA-32 or AMD64 based system:

./mtr --mysqld=-W3 main.1st
grep PAUSE var/log/mysqld.1.err

Basing the PR against the correct MariaDB version

  • [ ] This is a new feature and the PR is based against the latest MariaDB development branch.
  • [x] This is a bug fix and the PR is based against the earliest maintained branch in which the bug can be reproduced.

PR quality check

  • [x] I checked the CODING_STANDARDS.md file and my PR conforms to this where appropriate.
  • [ ] For any trivial modifications to the PR, I am ok with the reviewer making the changes themselves.

dr-m avatar Jun 04 '24 05:06 dr-m

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jun 04 '24 05:06 CLAassistant