Bug #99556 | Avoid sequentially consistent atomics for atomic counters | ||
---|---|---|---|
Submitted: | 13 May 2020 18:18 | Modified: | 15 May 2020 11:48 |
Reporter: | Sergey Glushchenko | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Compiling | Severity: | S5 (Performance) |
Version: | 8.0.20 | OS: | Any |
Assigned to: | CPU Architecture: | ARM |
[13 May 2020 18:18]
Sergey Glushchenko
[13 May 2020 18:20]
Sergey Glushchenko
suggested fix
Attachment: bug99556.patch (application/octet-stream, text), 8.39 KiB.
[14 May 2020 3:00]
Krunal Bauskar
Why introduce another structure when existing invocations that are limited could be fixed to using fetch_add/fetch_sub with the needed memory model.
[14 May 2020 12:45]
MySQL Verification Team
HI Mr. Glushchenko and Mr. Bauskar, Thank you for your important contribution. However, as far as I understand, your patch requires additional simplification. Please, do let me know when new patch is ready and I will verify this bug report ASAP.
[15 May 2020 6:57]
Sergey Glushchenko
Hi Mr. Milivojevic, I think this patch is good to go. Atomics are often used just as counters in server code and InnoDB, their use is not limited to the cases fixed in this patch. In the future I plan to submit another patch fixing some hot InnoDB counters. Also, introducing the new datatype makes the patch smaller. And finally, if we need to use one of the counters in the new code or modify existing code we don't need to remember to explicitly specify memory order.
[15 May 2020 11:48]
MySQL Verification Team
Hello Mr. Glushchenko, This report is verified as reported. Thank you for your contribution.