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

Some memory transactions are unnecessarily complex

    XMLWordPrintable

Details

    Description

      The MDEV-26769 implementation of memory transactions may invoke a system call within a memory transaction if a page latch is not available in buf_page_get_zip().

      In the Intel TSX-NI implementation (CPUID flag rtm), system calls will lead to the memory transaction being aborted, and there should be no correctness problem. The POWER v2.07 Hardware Transactional Memory allows memory transactions to execute system calls with some limitations, but our implementation assumes that no system calls will be executed as part of a memory transaction.

      Furthermore, many memory transactions contain read-modify-write operations, such as std::atomic::fetch_add(). Inside memory transactions, plain loads and stores would work equally well and could result in more efficient code.

      Attachments

        Issue Links

          Activity

            People

              marko Marko Mäkelä
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 2d 2.75h
                  2d 2.75h

                  Git Integration

                    Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.