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

Alter stdx::condition_variable::_runWithNotifyable to avoid allocations

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2.0-rc1, 4.3.1
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • Fully Compatible
    • v4.2
    • Service Arch 2019-06-03, Service Arch 2019-06-17

      condition_variable::_runWithNotifyable allocates a linked list member for the notification list per invocation. It also does this under both the condvar mutex as well as the mutex for the predicate waiter.

      Two things need to happen for this:

      1. notifyables need to either own a std::list<Notifyable*> or be intrusively linked listed
      2. NotInterruptible needs to not be a global (making it a thread local would do)

            Assignee:
            mira.carey@mongodb.com Mira Carey
            Reporter:
            mira.carey@mongodb.com Mira Carey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: