Bug #97704 innobase/srv: refine srv0conc with c++11 atomics
Submitted: 20 Nov 2019 9:17 Modified: 1 Sep 15:23
Reporter: Cai Yibo (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S5 (Performance)
Version:8.0 OS:Any
Assigned to: CPU Architecture:ARM
Tags: Contribution

[20 Nov 2019 9:17] Cai Yibo
Description:
This is followup patch of Bug #96504(Refine atomics and barriers for weak memory order platform).
It depends on the patch for Bug #97150.

"n_waiting" is a counter for adjusting thread sleep delay. Only atomicity is required.
Refine it with C++11 relaxed order.

"n_active" guards threads entering and leaving innodb.
Refine it with acquire/release order.

How to repeat:
N/A
[20 Nov 2019 9:18] Cai Yibo
patch

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: 0001-innobase-srv-refine-srv0conc.cc-with-c-11-atomics.patch (text/x-patch), 4.25 KiB.

[20 Nov 2019 9:58] MySQL Verification Team
Hello Cai Yibo,

Thank you for the report and contribution.

regards,
Umesh
[1 Sep 15:23] Daniel Price
Posted by developer:
 
Fixed as of the upcoming 8.0.23 release, and here's the proposed changelog entry from the documentation team:

Internal counter variables associated with thread sleep delay and threads
entering an leaving InnoDB were revised to use C++ std::atomic. Built-in
atomic operations were removed. 

 Thanks to Yibo Cai from ARM for the contribution.