[SERVER-5648] Improved support for native AtomicUInt64 Created: 19/Apr/12  Updated: 11/Jul/16  Resolved: 07/Jun/12

Status: Closed
Project: Core Server
Component/s: Concurrency
Affects Version/s: None
Fix Version/s: 2.1.2

Type: Improvement Priority: Major - P3
Reporter: Eliot Horowitz (Inactive) Assignee: Andy Schwerin
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-4985 connection id uses unsigned, should b... Closed
is related to SERVER-6018 Replace AtomicUInt with AtomicUInt32 Closed
Participants:

 Comments   
Comment by auto [ 07/Jun/12 ]

Author:

{u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-5648 Replace old implementation of AtomicUInt64 with new one.
Branch: master
https://github.com/mongodb/mongo/commit/9bb422bbce703da9913d807123480f00908de075

Comment by auto [ 07/Jun/12 ]

Author:

{u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-5648 Make AtomicWord<T> types PODs.
Branch: master
https://github.com/mongodb/mongo/commit/1c3be5814406e3a03afc8cbdaa3ebe8814013271

Comment by auto [ 06/Jun/12 ]

Author:

{u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-5648 Give AtomicWord::load and store full-barrier semantics.

Initially, they offered no-barrier semantics.

Also, fixes the implementation of 64-bit load and store on 32-bit machines, which
was not implemented in atomic fashion.

Finally, removes the "cc" clobber declaration on AtomicIntrinsics<T>::swap under
GCC, since the xchg instruction does not actually change the vakue of the flags
(cc) register.
Branch: master
https://github.com/mongodb/mongo/commit/188084dfb313fa2eef68975d8bc5107d5c1b7d60

Comment by auto [ 06/Jun/12 ]

Author:

{u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-5648: Sugar methods fetchAndSubtract, addAndFetch, subtractAndFetch, for AtomicWord<T>.
Branch: master
https://github.com/mongodb/mongo/commit/c506f3baa9ff074c9fa2d7b2979daee8ed305074

Comment by auto [ 06/Jun/12 ]

Author:

{u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-5648: Native support for 64-bit atomic integers on IA-32 with old gcc.
Branch: master
https://github.com/mongodb/mongo/commit/359c38ff920c06e037ac567fe6aa7942439d392c

Comment by auto [ 06/Jun/12 ]

Author:

{u'login': u'andy10gen', u'name': u'Andy Schwerin', u'email': u'schwerin@10gen.com'}

Message: SERVER-5648: Native support for 64-bit atomic integers.

Implementations for Windows compatible with Server 2003 and later, using the Interlocked* functions.

Implementations for gcc-compatible compilers targeting x86_64 (AMD64/IA-32e) using inline assembly.

Implementations for gcc-compatible compilers supporting __sync_val_compare_and_swap targeting x86
(IA-32), using a mix of inline assembly and __sync_val_compare_and_swap.

No implementation for older GCC compilers targeting x86 (IA-32), including the default compiler on RHEL5.

Unit test included, for correct single-threaded semantics.
Branch: master
https://github.com/mongodb/mongo/commit/e3c91147497d5ef7b28b61a0b859485fa7700cf4

Comment by Andy Schwerin [ 09/May/12 ]

SERVER-4985's proposed solution is a client of 64-bit atomic integer type.

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