Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace the default indexer for ib_counter_t values for performance
Summary: The default indexer for ib_counter_t values uses the result from 'pthread_self() % 64' to index into an array. Since pthread_self() likely returns a pointer to an internal structure on 64-bit platforms 'pthread_self() % 64' will often (always?) result in 0. This diff switches to using a different indexer that uses the current CPU when the sched_getcpu() function is available. Test Plan: MTR Reviewers: yoshinorim, MarkCallaghan Reviewed By: MarkCallaghan Subscribers: webscalesql-eng Differential Revision: https://reviews.facebook.net/D65427
- Loading branch information
Showing
4 changed files
with
28 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters