Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-10670

Remove LFENCE from the read barrier on x86

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major - P3
    • Resolution: Duplicate
    • None
    • None
    • None
    • 2023-05-02 StorEng Bug Bash

    Description

      Summary

      On x86, reads from memory are not reordered with other reads, which makes the LFENCE instruction unnecessary. We should consider removing it from WT_READ_BARRIER and turning it just into a compiler barrier, confirm that it is indeed safe, and evaluate any potential performance improvement.

      Acceptance Criteria

      The solution should remove LFENCE from WT_READ_BARRIER on x86, provide a solid argument for why it is safe, and at least roughly quantify any performance improvement. However, if there is no performance improvement, or if removing LFENCE is not safe, it should be explained in the comments.

      Note

      If we proceed with changing our code to use C11 atomics per PM-3220, this ticket may not be relevant, as that should also not have an effect of eliminating the use of LFENCE on x86.

      References

      Attachments

        Issue Links

          Activity

            People

              backlog-server-storage-engines Backlog - Storage Engines Team
              peter.macko@mongodb.com Peter Macko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: