Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-29462

Eliminate possibility of false sharing in partitioned lock

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.10
    • Affects Version/s: None
    • Component/s: Concurrency, Performance
    • Labels:
      None
    • Fully Compatible
    • Platforms 2017-07-10

      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.

            Assignee:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: