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

remove suport for "atomics" with rwlocks

    Details

    • Type: Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Fix Version/s: 10.1.3
    • Component/s: OTHER
    • Labels:
      None

      Description

      Our atomic ops library supports compilation in the mode where "atomic operations" aren't really atomic, but are protected with "rwlocks" (actually, mutexes). It was supposed to be used on platforms where we don't have native support for atomic ops.

      This mode complicates the code significantly. There's a lot of extra declarations, preprocessor macros and wrappers, etc everywhere. But in fact, this mode is almost never used — in a few cases where it was used, that happened by mistake, was caused by an error elsewhere. Furthermore, XtraDB now has (and had it for quite a while) the code that requires atomic ops and cannot be compiled with rwlocks. We build with XtraDB everywhere — meaning atomic ops are supported everywhere where we build.

      A suggestion is to remove this "rwlock" mode and remove all that complications that it forced into the code.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            serg Sergei Golubchik added a comment -

            Sergey Vojtovich, what do you think about it?

            Show
            serg Sergei Golubchik added a comment - Sergey Vojtovich , what do you think about it?
            Hide
            svoj Sergey Vojtovich added a comment -

            I like it. Just for the record:

            Show
            svoj Sergey Vojtovich added a comment - I like it. Just for the record: MySQL already removed them, see https://github.com/mysql/mysql-server/commit/885e9d30bdeb0c69db33138b4531eddc4d9bb97e rwlocks are not guaranteed to issue expected full memory barrier if we'll ever need to, we can hide locks behind API anyway

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                serg Sergei Golubchik
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h