[SERVER-54685] wrong definition of MONGO_YIELD_CORE_FOR_SMT for arm64 Created: 21/Feb/21  Updated: 29/Oct/23  Resolved: 24/Feb/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.9.0, 4.2.13, 4.4.5

Type: Bug Priority: Major - P3
Reporter: Tsahi Zidenberg Assignee: Andrew Morrow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to WT-6872 Replace the yield instructions with a... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v4.4, v4.2
Sprint: Dev Platform 2021-03-08
Participants:

 Description   

MONGO_YIELD_CORE_FOR_SMT is defined as the yield instuction, but yield is just a nop in arm64.

Using an "isb" instruction is a better implementation. The Instruction Synchronization Barrier will create a very small delay without taking other CPU resources, which is required while spinning on a spinlock.



 Comments   
Comment by Githook User [ 26/Feb/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-54685 Replace the ARM yield instruction with isb

(cherry picked from commit 6979525674af67405984c58585766dd4d0c3f2a8)
(cherry picked from commit 82a03739b80bf1873ec620165a1d8cfea2edd46f)
Branch: v4.2
https://github.com/mongodb/mongo/commit/a64233e90499f6e3d94c21fbe58c91e7bd744ba1

Comment by Githook User [ 26/Feb/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-54685 Replace the ARM yield instruction with isb

(cherry picked from commit 6979525674af67405984c58585766dd4d0c3f2a8)
Branch: v4.4
https://github.com/mongodb/mongo/commit/82a03739b80bf1873ec620165a1d8cfea2edd46f

Comment by Githook User [ 24/Feb/21 ]

Author:

{'name': 'Andrew Morrow', 'email': 'acm@mongodb.com', 'username': 'acmorrow'}

Message: SERVER-54685 Replace the ARM yield instruction with isb
Branch: master
https://github.com/mongodb/mongo/commit/6979525674af67405984c58585766dd4d0c3f2a8

Comment by Andrew Morrow (Inactive) [ 21/Feb/21 ]

tsahee@amazon.com - No problem, we will handle it on our side then.

Comment by Tsahi Zidenberg [ 21/Feb/21 ]

@acm I am not able to send PRs to mongodb. Please handle it on your side, and let me know if any questions come up.

Thank you!

Comment by Andrew Morrow (Inactive) [ 21/Feb/21 ]

tsahee@amazon.com - Thanks for filing the ticket. I see that a very similar change was made in the WT sources in WT-6872, so I'd be pretty comfortable making this change as well. We can either handle it on our side or if you would like to do so, a PR is welcome (please see the contributing guidelines here: https://github.com/mongodb/mongo/wiki#contributing-to-mongodb).

Generated at Thu Feb 08 05:34:12 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.