Bug #97766 innobase/os_once: optimize os_once with c++11 atomics
Submitted: 25 Nov 2019 8:20 Modified: 25 Nov 2019 8:33
Reporter: Cai Yibo (OCA) Email Updates:
Status: Verified 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

[25 Nov 2019 8:20] 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.

os_once::do_or_wait_for_done() implements similar function as std::call_once().
Current code forces full barrier on entering and leaving the critical section.
It can be optimized with load-acquire and store-release memory order.

How to repeat:
N/A
[25 Nov 2019 8:20] 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-os_once-optimize-os_once-with-c-11-atomics.patch (text/x-patch), 7.58 KiB.

[25 Nov 2019 8:33] Umesh Shastry
Hello Cai Yibo,

Thank you for the report and contribution.

regards,
Umesh