[SERVER-21542] Optimize SpinLock to use std::atomic_flag rather than pthread_spin_lock Created: 18/Nov/15  Updated: 25/Nov/15  Resolved: 18/Nov/15

Status: Closed
Project: Core Server
Component/s: Internal Code, Performance
Affects Version/s: None
Fix Version/s: 3.2.0-rc4

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Sprint: QuInt C (11/23/15)
Participants:

 Description   

Buys 2-5% perf wins on linux. No change will be made to the windows implementation of SpinLock in this work.



 Comments   
Comment by Githook User [ 19/Nov/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: SERVER-21542 Optimize spinlock on non-windows systems

This reverts commit 30458a9c6160b01925a8bdd768deb98ed8da8cb0.
Branch: master
https://github.com/mongodb/mongo/commit/3f598f1edc57ca0b863b58009e7cca9a986d4da7

Comment by Githook User [ 19/Nov/15 ]

Author:

{u'username': u'kaloianm', u'name': u'Kaloian Manassiev', u'email': u'kaloian.manassiev@mongodb.com'}

Message: Revert "SERVER-21542 Optimize spinlock on non-windows systems"

This reverts commit 18600ed909f739ab1bc3032c2a230aeac1abe1c2.
Branch: master
https://github.com/mongodb/mongo/commit/30458a9c6160b01925a8bdd768deb98ed8da8cb0

Comment by Githook User [ 19/Nov/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-21542 replace non-standard pthread_yield with standardized sched_yield
Branch: master
https://github.com/mongodb/mongo/commit/042d8fa2d252142489c5fa3009927bad20d77efb

Comment by Githook User [ 18/Nov/15 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-21542 Optimize spinlock on non-windows systems

Now uses std::atomic_flag rather than pthread_spinlock.
Branch: master
https://github.com/mongodb/mongo/commit/18600ed909f739ab1bc3032c2a230aeac1abe1c2

Generated at Thu Feb 08 03:57:40 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.