Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-14350

Only use wake_up_all() when necessary

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Minor
    • None
    • None
    • None
    • 9223372036854775807

    Description

      wake_up_all() is only needed when there are threads doing an exclusive wait.

      wake_up() will wake up all non-exclusive threads, and at most one exclusive thread.  When non-exclusive waits are used, it is sufficient and preferred to use wake_up() to  wake them up.

      wake_up_all() should be reserved for those cases where threads are waiting exclusively, and they all want to be woken up.  Keeping it for the purpose only improve code readability.

       

      Attachments

        Activity

          People

            wc-triage WC Triage
            neilb Neil Brown
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: