You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug#17507853 PREVENT FALSE SHARING OF CPU CACHE LINE FOR SENSITIVE COUNTERS
This fix is a code cleanup to avoid risks of performance degradations.
In the performance schema code, several internal counters are highly
sensitive, because they are used very often, and used with atomic
operations.
For these counters, it is critical that the counter is allocated on a CPU
cache line, and that no other variable is allocated in the same memory area,
which can end up in the same CPU cache line.
This fix introduce PFS_cacheline_uint32 and PFS_cacheline_uint64,
to enforce this property.
Al internal counters related to allocation internal objects have been
changed to use PFS_cacheline_uint32/64.
Whether CPU cache line collision did happened in the past,
causing performance degradations, is unknown, so this fix may not improve
current performance.
What this fix does however, is to make sure that cache line collisions are
now impossible, to prevent any regressions when using:
- different compilers
- different compiler options
- different CPUs
Also, the allocation algorithm for PFS_account, PFS_user and PFS_host have
been changed to follow the mainline code.
PFS_scan has been removed, this way of performing allocations is no longer
needed.
0 commit comments