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

do not call slow my_timer_init() several times

Details

    Description

      my_thr_timer() call times() which is slow at least on my system. Maybe it's due to spectre mitigations, I don't know. Flame graph shows profiling data for empty test. Perfschema and InnoDB storage engines calls my_thr_timer() while both can actually use the one initialized by server.

      Attachments

        1. original_10.1.svg
          960 kB
          Eugene Kosov
        2. fixed_10.1.svg
          1.14 MB
          Eugene Kosov

        Activity

          kevg Eugene Kosov (Inactive) created issue -
          kevg Eugene Kosov (Inactive) made changes -
          Field Original Value New Value
          Attachment fixed_10.1.svg [ 48022 ]

          Attaching flame graph with a patch from PR too.

          kevg Eugene Kosov (Inactive) added a comment - Attaching flame graph with a patch from PR too.
          kevg Eugene Kosov (Inactive) made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          kevg Eugene Kosov (Inactive) made changes -
          Assignee Eugene Kosov [ kevg ] Sergey Vojtovich [ svoj ]
          Status In Progress [ 3 ] In Review [ 10002 ]

          Already merged by marko

          svoj Sergey Vojtovich added a comment - Already merged by marko
          svoj Sergey Vojtovich made changes -
          Assignee Sergey Vojtovich [ svoj ] Eugene Kosov [ kevg ]
          Status In Review [ 10002 ] Stalled [ 10000 ]

          This looked trivial to me. Thanks!

          I wonder if we could remove the parameter of my_timer_init() and always let it initialize sys_timer_info.

          marko Marko Mäkelä added a comment - This looked trivial to me. Thanks! I wonder if we could remove the parameter of my_timer_init() and always let it initialize sys_timer_info .
          marko Marko Mäkelä made changes -
          issue.field.resolutiondate 2019-05-06 13:18:31.0 2019-05-06 13:18:31.436
          marko Marko Mäkelä made changes -
          Component/s Storage Engine - XtraDB [ 10135 ]
          Fix Version/s 10.1.40 [ 23306 ]
          Fix Version/s 10.2.24 [ 23308 ]
          Fix Version/s 10.3.15 [ 23309 ]
          Fix Version/s 10.4.5 [ 23311 ]
          Fix Version/s 10.2 [ 14601 ]
          Fix Version/s 10.1 [ 16100 ]
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.5 [ 23123 ]
          Resolution Fixed [ 1 ]
          Status Stalled [ 10000 ] Closed [ 6 ]

          Unfortunately, the change caused link-time failures to resolve the global symbol sys_timer_info, and had to be reverted.

          marko Marko Mäkelä added a comment - Unfortunately, the change caused link-time failures to resolve the global symbol sys_timer_info , and had to be reverted.
          marko Marko Mäkelä made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Stalled [ 10000 ]
          kevg Eugene Kosov (Inactive) made changes -
          Status Stalled [ 10000 ] In Progress [ 3 ]
          kevg Eugene Kosov (Inactive) made changes -
          Assignee Eugene Kosov [ kevg ] Marko Mäkelä [ marko ]
          Status In Progress [ 3 ] In Review [ 10002 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.1.41 [ 23406 ]
          Fix Version/s 10.1.40 [ 23306 ]
          serg Sergei Golubchik made changes -
          Fix Version/s 10.1 [ 16100 ]
          Fix Version/s 10.2 [ 14601 ]
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Fix Version/s 10.2.24 [ 23308 ]
          Fix Version/s 10.3.15 [ 23309 ]
          Fix Version/s 10.4.5 [ 23311 ]
          Fix Version/s 10.1.41 [ 23406 ]
          marko Marko Mäkelä made changes -
          Fix Version/s 10.1.41 [ 23406 ]
          Fix Version/s 10.2.25 [ 23408 ]
          Fix Version/s 10.3.15 [ 23309 ]
          Fix Version/s 10.4.5 [ 23311 ]
          Fix Version/s 10.2 [ 14601 ]
          Fix Version/s 10.1 [ 16100 ]
          Fix Version/s 10.3 [ 22126 ]
          Fix Version/s 10.4 [ 22408 ]
          Assignee Marko Mäkelä [ marko ] Eugene Kosov [ kevg ]
          Resolution Fixed [ 1 ]
          Status In Review [ 10002 ] Closed [ 6 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 96566 ] MariaDB v4 [ 156150 ]

          People

            kevg Eugene Kosov (Inactive)
            kevg Eugene Kosov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

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