Bug #59710 InnoDB mutex_t size should be trimmed
Submitted: 25 Jan 2011 10:11
Reporter: Sunny Bains Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.6+ OS:Any
Assigned to: Assigned Account CPU Architecture:Any
Tags: buffer pool, innodb

[25 Jan 2011 10:11] Sunny Bains
Description:
The InnoDB mutex_t type contains an os_even_t and a pointer to the filename and lineno
info where the mutex was created. With one mutex per block in the buffer pool this can
be a high overhead.

How to repeat:
Code inspection.

Suggested fix:
Move them out of the mutex_t structure
  
  1. Make the relationship 1 -> N for filename and lineno - N == no. of similar mutexes
  2. Use an event pool

The problem is that we don't want the event pool to be the new (hot) contention point
undoing the benefit of separate os_event_t per mutex that was introduced to overcome
the sync array mutex contention.