Bug #70417 | rw_lock_x_lock_func_nowait() calls os_thread_get_curr_id() mostly needlessly | ||
---|---|---|---|
Submitted: | 25 Sep 2013 11:04 | Modified: | 3 Feb 2014 10:48 |
Reporter: | Laurynas Biveinis (OCA) | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S5 (Performance) |
Version: | 5.6 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[25 Sep 2013 11:04]
Laurynas Biveinis
[25 Sep 2013 15:25]
MySQL Verification Team
thanks, verified in 5.7 also
[27 Nov 2013 17:49]
Daniel Price
Fixed as of 5.6.16, 5.7.4. Noted in 5.6.16, 5.7.4 changelogs: In "sync0rw.ic", "rw_lock_x_lock_func_nowait" would needlessly call "os_thread_get_curr_id".
[3 Feb 2014 10:48]
Laurynas Biveinis
5.6$ bzr log -r 5655 ------------------------------------------------------------ revno: 5655 committer: Aditya A <aditya.a@oracle.com> branch nick: mysql-5.6 timestamp: Wed 2013-11-27 20:09:55 +0530 message: Bug#17509710 RW_LOCK_X_LOCK_FUNC_NOWAIT() CALLS OS_THREAD_GET_CURR_ID() MOSTLY NEEDLESSLY PROBLEM ------- os_thread_get_curr_id() was being called for each invocation of function rw_lock_x_lock_func_nowait(), but only used when we fail to acquire the locks. FIX --- Call os_thread_get_curr_id() only when required. [Approved by Marko #rb 3967]