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

ll_have_md_lock() code optimization

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • Lustre 2.2.0
    • Lustre 2.1.0
    • None
    • 4875

      Suggested by Andreas:
      in ll_md_blocking_ast(), Instead of doing multiple searches for these lock bits, it makes more sense to change ll_have_md_lock() to take "&bits" as the parameter (instead of a specific single bit), and then it can do a search on the first bit in the mask. If any lock is found, it can zero out all of the set lock bits in the lock from "&bits".

      In the common case where there are multiple bits set in the lock this will avoid calling ll_have_md_lock->md_lock_match() multiple times for each file.

            pjones Peter Jones
            cealustre CEA
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: