[MDEV-5403] Reduce usage of LOCK_open: tc_count Created: 2013-12-06  Updated: 2014-03-14  Resolved: 2014-02-13

Status: Closed
Project: MariaDB Server
Component/s: None
Fix Version/s: 10.0.9

Type: Task Priority: Major
Reporter: Sergey Vojtovich Assignee: Sergey Vojtovich
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-4702 Reduce usage of LOCK_open Closed
relates to MDEV-4956 Reduce usage of LOCK_open: TABLE_SHAR... Closed
relates to MDEV-5388 Reduce usage of LOCK_open: unused_tables Closed
relates to MDEV-5492 Reduce usage of LOCK_open: TABLE::in_use Closed
relates to MDEV-5864 Reduce usage of LOCK_open: TABLE_SHAR... Closed
relates to MDEV-5597 Reduce usage of LOCK_open: LOCK_flush Closed

 Description   

tc_release_table is critical section of table cache. Among other things, it checks if table cache threshold is reached and if so evicts to-be-released table. This is done by comparing tc_count with tc_size.

tc_count can be atomic and checked beyond of LOCK_open. Besides it is last global variable protected by this lock.

The cost is as following:

  • tc_add_table() assumed that there is nothing to evict if tc_count > tc_size and skipped expensive LRU lookup. This assumption will be broken and LRU lookup must be done if tc_count >= tc_size.

A patch for this task hasn't been benchmarked yet.



 Comments   
Comment by Sergey Vojtovich [ 2013-12-06 ]

Sergei, please review patch for this task.

Comment by Sergey Vojtovich [ 2013-12-19 ]

Sergei, please review updated patch.

Comment by Sergey Vojtovich [ 2014-02-13 ]

Pushed to 10.0.9, revno: 4003, revision-id: svoj@mariadb.org-20140213061937-dt9f6rx9n13trbv6

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