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

Remove LFENCE from the read barrier on x86

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • 2023-05-02 StorEng Bug Bash

      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

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

              Created:
              Updated:
              Resolved: