Bug #55462 Performance schema: reduce the overhead of PFS_events_waits::m_wait_class
Submitted: 21 Jul 2010 23:22 Modified: 20 Aug 2010 14:50
Reporter: Marc ALFF Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Performance Schema Severity:S5 (Performance)
Version:5.5.3-m3 OS:Any
Assigned to: Marc ALFF CPU Architecture:Any

[21 Jul 2010 23:22] Marc ALFF
Description:
In the structure PFS_events_waits, m_wait_class is declared volatile.

The original intent of "volatile" was for robustness and avoid race
conditions between a reader (SELECT * from performance_schema)
and a writer (instrumented code).

The race is already covered by another mechanism (PFS_lock m_lock),
so m_wait_class does not need to implement a duplicated protection.

This is a performance bug, as volatile m_wait_class causes a loss that
can be avoided

How to repeat:
Read the code.

Suggested fix:
make m_wait_class non volatile
[21 Jul 2010 23:58] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/114105

3133 Marc Alff	2010-07-21
      Bug#55462 Performance schema: reduce the overhead of PFS_events_waits::m_wait_class
      
      This is a performance improvement fix.
      
      Removed the "volatile" property of PFS_events_waits::m_wait_class.
      Simplified the code accordingly.
[22 Jul 2010 19:32] Christopher Powers
Patch reviewed.
[12 Aug 2010 9:52] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/115553

3174 Marc Alff	2010-08-12
      Bug#55462 Performance schema: reduce the overhead of PFS_events_waits::m_wait_class
      
      This is a performance improvement fix.
      
      Removed the "volatile" property of PFS_events_waits::m_wait_class.
      Simplified the code accordingly.
[12 Aug 2010 11:12] Marc ALFF
Pushed into:
- mysql-5.5-bugfixing
- mysql-trunk-bugfixing
- mysql-next-mr-bugfixing
[12 Aug 2010 16:07] Marc ALFF
Doc team:

Minor code simplification.
Nothing to document since there is no previous GA release
that contain the performance schema.
[16 Aug 2010 6:30] Bugs System
Pushed into mysql-trunk 5.6.1-m4 (revid:alik@sun.com-20100816062701-qo9dpnk5tkt1pksb) (version source revid:alik@sun.com-20100816062603-xc16eftmv7rmktyq) (merge vers: 5.6.1-m4) (pib:20)
[16 Aug 2010 6:38] Bugs System
Pushed into mysql-next-mr (revid:alik@sun.com-20100816062819-bluwgdq8q4xysmlg) (version source revid:alik@sun.com-20100816062612-enatdwnv809iw3s9) (pib:20)
[16 Aug 2010 15:42] Paul DuBois
No changelog entry needed.