[MDEV-19399] do not call slow my_timer_init() several times Created: 2019-05-06  Updated: 2019-05-10  Resolved: 2019-05-10

Status: Closed
Project: MariaDB Server
Component/s: Information Schema, Server, Storage Engine - InnoDB, Storage Engine - XtraDB
Affects Version/s: 5.5, 10.1, 10.2, 10.3, 10.4, 10.5
Fix Version/s: 10.2.25, 10.1.41, 10.3.15, 10.4.5

Type: Bug Priority: Major
Reporter: Eugene Kosov (Inactive) Assignee: Eugene Kosov (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Attachments: File fixed_10.1.svg     File original_10.1.svg    

 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.



 Comments   
Comment by Eugene Kosov (Inactive) [ 2019-05-06 ]

Attaching flame graph with a patch from PR too.

Comment by Sergey Vojtovich [ 2019-05-06 ]

Already merged by marko

Comment by Marko Mäkelä [ 2019-05-06 ]

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.

Comment by Marko Mäkelä [ 2019-05-06 ]

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

Generated at Thu Feb 08 08:51:23 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.