Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-6693

Atomic operations with explicit memory barrier

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 10.1.1
    • Component/s: OTHER
    • Labels:
      None

      Description

      Currently atomic operations create full memory barrier. This ensures correct program behavior. However weaker memory barriers have lower performance impact and there are many cases when weaker memory barrier is sufficient.

      The idea of this task is to adopt C11 atomic API to some extent, so it is possible to specify memory barriers for atomic operations.

      C11 atomic operations as such seem to be unavailable in many environments. E.g. they appeared only in gcc-4.9. MSVC doesn't seem to support them, same for Solaris Studio.

      It is proposed to use gcc atomic builtins whenever they're available, otherwise fall back to atomic operations with implicit full memory barrier.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              svoj Sergey Vojtovich
              Reporter:
              svoj Sergey Vojtovich
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: