[SERVER-29462] Eliminate possibility of false sharing in partitioned lock Created: 06/Jun/17 Updated: 30/Oct/23 Resolved: 05/Jul/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Concurrency, Performance |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.10 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morrow (Inactive) | Assignee: | Andrew Morrow (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Sprint: | Platforms 2017-07-10 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Description |
|
The vector of mutexes inside catalog/util/partitioned.h does not ensure that the locks are on different cache lines. Ideally, we would use C++17's std::hardware_destructive_interference_size and alignas to fix this, however, not all of our toolchains currently support the required extended alignment. Instead, as a simpler fix, we should just allocate the mutexes on the heap, which is very likely to ensure that they land on different cachelines. |
| Comments |
| Comment by Githook User [ 05/Jul/17 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: This reverts commit 5a933be9235b7d02bb5c790c7ff7eba3a867c43a. |
| Comment by Githook User [ 03/Jul/17 ] |
|
Author: {u'username': u'benety', u'name': u'Benety Goh', u'email': u'benety@mongodb.com'}Message: Revert " This reverts commit edc858ca3a32974c07f027e6860a52ac6e89039b. |
| Comment by Githook User [ 01/Jul/17 ] |
|
Author: {u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}Message: |
| Comment by Andrew Morrow (Inactive) [ 20/Jun/17 ] |
|
kyle.suarez - Yes, and I actually plumbed it through the partitioned lock too, so I'll grab this ticket for now. |
| Comment by Kyle Suarez [ 19/Jun/17 ] |
|
Looks like acm is actively working on |